- build_trucking_campaigns.py: nightly script that creates 8 Listmonk campaigns per day (4 TZ x 2 types: MCS-150 overdue 2k/TZ, inactive USDOT 1k/TZ) at 4AM ET / 5AM ET (CT) / 6AM ET (MT) / 7AM ET (PT). Deduplicates via listmonk_sent_at column. - migration 083: add listmonk_sent_at + listmonk_campaign_type to fmcsa_carriers - email_verifier.py: bump max_workers from 5 to 20 for 4x faster throughput - cron: daily pw-trucking-campaigns at 08:00 UTC (3 AM EST) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 lines
430 B
SQL
10 lines
430 B
SQL
-- Track which fmcsa_carriers records have been added to Listmonk campaign lists,
|
|
-- so the daily campaign builder never double-sends to the same carrier.
|
|
|
|
ALTER TABLE fmcsa_carriers
|
|
ADD COLUMN IF NOT EXISTS listmonk_sent_at TIMESTAMPTZ,
|
|
ADD COLUMN IF NOT EXISTS listmonk_campaign_type TEXT;
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_fmcsa_carriers_listmonk_sent
|
|
ON fmcsa_carriers (listmonk_sent_at)
|
|
WHERE listmonk_sent_at IS NULL;
|