Configure trucking deficiency campaign cron env
This commit is contained in:
parent
72da37e47d
commit
5c35140a22
5 changed files with 41 additions and 1 deletions
|
|
@ -120,6 +120,15 @@ services:
|
|||
- ANYTIME_MAILBOX_OTP_CODE=${ANYTIME_MAILBOX_OTP_CODE}
|
||||
- ANYTIME_MAILBOX_OTP_POLL_SECONDS=${ANYTIME_MAILBOX_OTP_POLL_SECONDS:-6}
|
||||
- ANYTIME_MAILBOX_OTP_TIMEOUT_SECONDS=${ANYTIME_MAILBOX_OTP_TIMEOUT_SECONDS:-180}
|
||||
# Listmonk source campaign IDs cloned by scripts.build_trucking_campaigns
|
||||
# for the daily trucking deficiency-flag segments. Set in .env after
|
||||
# running scripts/create_deficiency_source_campaigns.py on prod.
|
||||
- CAMPAIGN_FOR_HIRE_ID=${CAMPAIGN_FOR_HIRE_ID}
|
||||
- CAMPAIGN_IRP_IFTA_ID=${CAMPAIGN_IRP_IFTA_ID}
|
||||
- CAMPAIGN_INTRASTATE_ID=${CAMPAIGN_INTRASTATE_ID}
|
||||
- CAMPAIGN_WEIGHT_TAX_ID=${CAMPAIGN_WEIGHT_TAX_ID}
|
||||
- CAMPAIGN_EMISSIONS_ID=${CAMPAIGN_EMISSIONS_ID}
|
||||
- CAMPAIGN_HAZMAT_ID=${CAMPAIGN_HAZMAT_ID}
|
||||
volumes:
|
||||
- worker-data:/app/data
|
||||
depends_on:
|
||||
|
|
|
|||
|
|
@ -90,6 +90,15 @@ listmonk_smtp_pass: "{{ vault_listmonk_smtp_pass }}"
|
|||
listmonk_admin_user: "{{ vault_listmonk_admin_user }}"
|
||||
listmonk_admin_password: "{{ vault_listmonk_admin_password }}"
|
||||
|
||||
# Listmonk draft source campaigns cloned by scripts.build_trucking_campaigns
|
||||
# for daily trucking deficiency-flag sends.
|
||||
trucking_campaign_for_hire_id: 309
|
||||
trucking_campaign_irp_ifta_id: 310
|
||||
trucking_campaign_intrastate_id: 271
|
||||
trucking_campaign_weight_tax_id: 272
|
||||
trucking_campaign_emissions_id: 273
|
||||
trucking_campaign_hazmat_id: 274
|
||||
|
||||
# ── Common packages ───────────────────────────────────────────────────────────
|
||||
common_packages:
|
||||
- curl
|
||||
|
|
|
|||
|
|
@ -66,6 +66,18 @@ ADMIN_EMAIL={{ smtp_admin_email }}
|
|||
LISTMONK_URL=http://listmonk:9000
|
||||
LISTMONK_ADMIN_USER={{ listmonk_admin_user }}
|
||||
LISTMONK_ADMIN_PASSWORD={{ listmonk_admin_password }}
|
||||
LISTMONK_USER={{ listmonk_admin_user }}
|
||||
LISTMONK_PASS={{ listmonk_admin_password }}
|
||||
LISTMONK_PASSWORD={{ listmonk_admin_password }}
|
||||
|
||||
# Source campaign IDs cloned by the daily trucking campaign builder. Create/fetch
|
||||
# them with: python3 scripts/create_deficiency_source_campaigns.py
|
||||
CAMPAIGN_FOR_HIRE_ID={{ trucking_campaign_for_hire_id | default('') }}
|
||||
CAMPAIGN_IRP_IFTA_ID={{ trucking_campaign_irp_ifta_id | default('') }}
|
||||
CAMPAIGN_INTRASTATE_ID={{ trucking_campaign_intrastate_id | default('') }}
|
||||
CAMPAIGN_WEIGHT_TAX_ID={{ trucking_campaign_weight_tax_id | default('') }}
|
||||
CAMPAIGN_EMISSIONS_ID={{ trucking_campaign_emissions_id | default('') }}
|
||||
CAMPAIGN_HAZMAT_ID={{ trucking_campaign_hazmat_id | default('') }}
|
||||
|
||||
# ── Umami analytics ──────────────────────────────────────────────────────────
|
||||
UMAMI_DB_PASSWORD={{ umami_db_password }}
|
||||
|
|
|
|||
|
|
@ -15,9 +15,17 @@ Usage (inside the workers container on prod):
|
|||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
import build_trucking_campaigns as b # reuse lm_api + auth + segment defs
|
||||
# Allow both supported invocation styles:
|
||||
# python -m scripts.create_deficiency_source_campaigns
|
||||
# python3 scripts/create_deficiency_source_campaigns.py
|
||||
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
if ROOT not in sys.path:
|
||||
sys.path.insert(0, ROOT)
|
||||
|
||||
from scripts import build_trucking_campaigns as b # reuse lm_api + auth + segment defs
|
||||
|
||||
FROM_EMAIL = "Performance West <noreply@performancewest.net>"
|
||||
TEMPLATE_ID = 6 # same wrapper template as the MCS-150 source campaign
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ import sys
|
|||
|
||||
ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
BTC = os.path.join(ROOT, "scripts/build_trucking_campaigns.py")
|
||||
if ROOT not in sys.path:
|
||||
sys.path.insert(0, ROOT)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue