ferrero-opentext/Python-Version/scripts
nickviljoen e1f15ea632 Add A1 retry logic and orchestrator off-hours cadence
Feature 1: A1→A2 Empty Folder Retry Logic
- Track retry attempts (max 3) for campaigns with no master assets
- Mark campaigns as permanently failed after 3 attempts
- Stop processing and sending emails for permanently failed campaigns
- Two new email templates: retry notification and permanent failure
- Database migration adds 4 new columns to campaign_status table
- Comprehensive documentation in A1_RETRY_LOGIC.md

Feature 2: Orchestrator Off-Hours Cadence
- Add 30 minutes to all task intervals during off-hours
- Off-hours: 10 PM - 5 AM weekdays + all day Saturday/Sunday
- Tasks only run at minutes 0 and 30 during off-hours
- Configurable and easy to enable/disable
- Daily Report (7 PM) remains unchanged

Files changed:
- NEW: database/migrations/003_add_a1_retry_tracking.sql
- NEW: MARKDOWN_DOCS/A1_RETRY_LOGIC.md
- MODIFIED: scripts/shared/database.py (added 3 methods)
- MODIFIED: scripts/a1_to_a2_box_uploader.py (added retry logic)
- MODIFIED: scripts/shared/notifier.py (added 2 templates)
- MODIFIED: scripts/orchestrator-prod.py (added off-hours config)
- MODIFIED: RUN_ORCHESTRATOR.md (added off-hours docs)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-31 17:38:57 +02:00
..
__pycache__ feat: Add Python project dependencies. 2025-11-20 22:45:04 -05:00
shared Add A1 retry logic and orchestrator off-hours cadence 2026-01-31 17:38:57 +02:00
a1_to_a2_box_uploader.py Add A1 retry logic and orchestrator off-hours cadence 2026-01-31 17:38:57 +02:00
a1_to_a2_download-old.py feat: Add A1→A3 campaign advance script, introduce systemd service for orchestrator, and ref 2025-11-24 13:50:16 -05:00
a2_to_a3_upload_polling.py Feat: Add subfolder path to A2->A3 email notifications 2026-01-19 10:20:51 -05:00
a3_advance.py PPR Environment: Use SIMPLE metadata structure for tabular fields 2026-01-23 16:52:50 +02:00
a3_advance.py.backup PPR Environment: Use SIMPLE metadata structure for tabular fields 2026-01-23 16:52:50 +02:00
a4_box_uploader.py Update CSV format to combine Campaign Number and Name, add manual regeneration script 2025-12-01 09:22:32 -05:00
a4_webhook_monitor.py Add --auth-pfx-v2 support to A4 Webhook Monitor for production 2025-11-26 15:39:00 -05:00
a5_to_a6_download.py Fix campaign ID storage - always set local_campaign_id 2025-12-22 11:37:58 -05:00
advance_a1_to_a3.py Add interactive campaign status management scripts 2025-11-07 15:23:26 -05:00
b1_to_b2_download.py Add CSV attachment with campaign details to A1 and B1 success emails 2025-12-07 19:27:36 -05:00
creativex-service.service Add systemd service files for Prod Orchestrator and CreativeX Service 2025-12-01 16:09:26 -05:00
creativex_scoring_storing.py PPR Environment: Use SIMPLE metadata structure for tabular fields 2026-01-23 16:52:50 +02:00
creativex_service.py Add CreativeX service runner and fix dam_client indentation 2025-12-01 15:29:27 -05:00
daily_report.py Enhancement: Add timestamps to batch entries in daily report for better identification 2026-01-19 15:16:13 -05:00
debug_b1_pagination.py Add debug script for B1 pagination issue 2025-12-02 09:44:10 -05:00
get_token.py feat: Add systemd services and timers for daily and weekly database backups, introduce a token retrieval script, and update the backup guide documentation. 2025-12-01 22:19:24 -05:00
list_campaigns_by_status.py PPR Environment: Use SIMPLE metadata structure for tabular fields 2026-01-23 16:52:50 +02:00
manual_csv_regenerate.py Update CSV format to combine Campaign Number and Name, add manual regeneration script 2025-12-01 09:22:32 -05:00
orchestrator-prod.py Add A1 retry logic and orchestrator off-hours cadence 2026-01-31 17:38:57 +02:00
orchestrator.py Change script intervals from 5 to 3 minutes for faster processing 2025-11-26 14:18:45 -05:00
test-metadata-diagnostic.py PPR Environment: Use SIMPLE metadata structure for tabular fields 2026-01-23 16:52:50 +02:00
test-prod-smoke-test.py Fix smoke test to use prod-auth endpoint instead of test-auth 2025-11-26 10:20:59 -05:00
update_campaign_status.py Add --auth-pfx-v2 and --env options to update_campaign_status.py 2025-11-27 06:58:39 -05:00