new-site/scripts/workers
justin 68e6b60951 fix: worker emails (localhost:25 -> SMTP relay) + create ERPNext SO on webhook payment
Two bugs found tracing Mitchell Allen's batch CB-95BA6C90 (5 DOT services, card):

1) Worker authorization/signing-link/status emails were sent via
   smtplib.SMTP('localhost', 25), which has no MTA in the workers container ->
   every send failed '[Errno 111] Connection refused', so customers never got
   their e-sign links and orders sat 'awaiting client signature' forever. Routed
   all 9 hardcoded localhost:25 sites (state_trucking, mcs150_update, boc3_filing,
   hazmat_phmsa, mailbox_setup, dot_esign, completion_emails) through the
   authenticated SMTP relay (SMTP_HOST/PORT/STARTTLS/login) + added a shared
   worker_email.send_worker_email helper.

2) The ERPNext Sales Order for compliance/compliance_batch was only created in
   the /checkout/create-session endpoint, but CARD orders confirm via the Stripe
   WEBHOOK -> handlePaymentComplete, which never created the SO. Result: every
   webhook-confirmed order had erpnext_sales_order=NULL and workers logged
   'Sales Order not found 404' then built from PG. Added idempotent
   ensureComplianceSalesOrder() to handlePaymentComplete so ALL payment methods
   (card-webhook, PayPal, crypto) create + link the SO.
2026-06-09 14:40:46 -05:00
..
cdr_adapters Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
cdr_presets Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
cdr_transports Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
crypto_offramp Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
icc_adapters Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
services fix: worker emails (localhost:25 -> SMTP relay) + create ERPNext SO on webhook payment 2026-06-09 14:40:46 -05:00
__init__.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
access_stim_monitor.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
amb_location_scraper.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
base_worker.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
binder_compiler.py Add Canadian Wholesale Vendor Reference Guide to CRTC binder 2026-05-27 11:11:47 -05:00
business_days.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
cdr_classifier.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
cdr_ingester.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
cdr_npa_importer.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
cdr_puller.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
cdr_retention_sweeper.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
cdr_sftpgo_provisioner.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
cdr_unlock_nudge.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
client_email_processor.py add FMCSA confirmation email monitor: IMAP watcher links confirmations to orders, Telegram notify 2026-05-30 19:01:42 -05:00
cold_wallet_sweeper.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
commission_worker.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
completion_emails.py fix: worker emails (localhost:25 -> SMTP relay) + create ERPNext SO on webhook payment 2026-06-09 14:40:46 -05:00
compliance_alert_list.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
conversation_monitor.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
convert_guides.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
create_campaigns.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
create_campaigns_p2.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
create_compliance_campaign.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
crypto_payment_worker.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
daily_paper_batch.py healthcare: verify CMS-10114 update path, correct NPI Enumerator address, build CMS-10114 filler 2026-06-07 02:04:41 -05:00
delivery_worker.py portal: converge all compliance orders on the single ERPNext portal 2026-06-02 22:44:34 -05:00
deminimis_factor_check.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
email_verifier.py trucking campaigns: daily builder + MX verifier concurrency + tracking column 2026-05-31 10:07:44 -05:00
entity_scraper.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
erpnext_client.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
fax_sender.py add dev mode guards: skip FMCSA submission, fax, and web filing in non-production environments 2026-05-30 22:28:59 -05:00
fcc_499_filer_import.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
fcc_499_filer_scraper.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
fcc_cores_scraper.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
fcc_rmd_auditor.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
fcc_rmd_removed_scraper.py Fix long-running PG transactions in RMD scrapers 2026-05-03 04:13:33 -05:00
fcc_rmd_scraper.py Fix long-running PG transactions in RMD scrapers 2026-05-03 04:13:33 -05:00
fix_349.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
fix_campaigns.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
fl_entity_downloader.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
flag_outside_counsel.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
fmcsa_census_downloader.py Fix census download crash at 100K: integer out of range 2026-05-30 13:41:24 -05:00
fmcsa_deficiency_flagger.py Fix state list import: use individual subscriber creates instead of bulk 2026-05-29 14:26:44 -05:00
fmcsa_enrichment.py FMCSA enrichment: OOS orders bulk download + authority/insurance API lookup 2026-05-30 14:46:40 -05:00
gckey_provisioner.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
hestia_provisioner.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
icc_ingester.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
ink_signature_cli.py Add portable Line-us pen-arm support to ink-signature pipeline 2026-06-07 03:45:46 -05:00
intake_reminder.py feat: daily intake-reminder worker for paid orders with incomplete intake 2026-06-03 00:20:37 -05:00
job_server.py fix(formation): add working /name-search worker route + e2e harness 2026-06-09 07:51:54 -05:00
listmonk_import.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
mac_routing.py healthcare: verify CMS-10114 update path, correct NPI Enumerator address, build CMS-10114 filler 2026-06-07 02:04:41 -05:00
payment_reminder.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
pipeline_orchestrator.py fix(checkout): route dot-new-carrier-bundle on success page + worker pipeline 2026-06-08 23:48:56 -05:00
quarterly_499q_notify.py Implement 499-Q quarterly filing lifecycle 2026-05-03 02:28:04 -05:00
relay_deposit_monitor.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
relay_integration.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
remove_adversary_subscribers.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
renewal_worker.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
rmd_deficiency_campaign.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
swap_discount_to_4pay.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
telegram_notify.py Wire fulfillment alerts to Telegram + surface order progress in portal + even out ERPNext sync 2026-06-07 03:17:46 -05:00
update_campaign_ctas.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
usac_audit_scraper.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
usac_import.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
usf_factor_monitor.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
worker_email.py fix: worker emails (localhost:25 -> SMTP relay) + create ERPNext SO on webhook payment 2026-06-09 14:40:46 -05:00
wy_entity_scraper.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00