ferrero-opentext/Python-Version/scripts/shared
nickviljoen 90f326aecb Enhancement: Treat empty A1 folders as expected workflow
Campaign managers often create the campaign in DAM before assets are
uploaded, so an empty Master Assets folder is the normal pre-asset state
rather than a failure. Stop marking these as permanently failed and stop
emailing on every poll.

- increment_a1_retry() gains mark_failed_at_max param; empty-folder path
  passes False so the campaign keeps polling indefinitely until assets
  appear (or the DAM status changes).
- Empty-folder branch now skips silently on every poll and sends a single
  warning email at poll 20 (~1 hour at the 3-min cadence) so genuinely
  stuck campaigns still surface.
- New a1_to_a2_no_assets_warning email template — one-time soft warning,
  no permanent-failure language.
- Existing reset_a1_retry() on successful A1→A2 still clears the counter
  when assets eventually appear.
- Other folder-error paths (folder not found, etc.) keep the original
  3-retry-then-fail behavior.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 15:20:41 +02:00
..
__pycache__ 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
__init__.py Start Python automation - Foundation components 2025-10-30 16:38:26 -04:00
box_client.py Implement Master Tracking ID validation for A2-A3 uploads 2025-12-06 17:21:38 -05:00
common.py Implement robust Box name sanitization in shared/common.py 2025-12-01 15:23:01 -05:00
config_loader.py Enhancement: Add environment-specific configurations and metadata improvements 2026-01-28 20:41:21 +02:00
dam_client.py Fix: Recurse into subfolders with numeric extensions (e.g. "2.0") 2026-04-10 09:46:32 +02:00
database.py Enhancement: Treat empty A1 folders as expected workflow 2026-04-28 15:20:41 +02:00
filename_parser.py Enhancement: EOL (External Legal Opinion) workflow 2026-03-31 15:53:37 +02:00
filename_parser_v1_backup.py Update filename parser to V2.1 structure with new field positions 2025-11-13 13:41:19 -05:00
metadata_extractor_mvp.py Fix: Template-based folder-only mode for -N flag uploads 2026-03-31 15:53:10 +02:00
metadata_extractor_mvp.py.backup PPR Environment: Use SIMPLE metadata structure for tabular fields 2026-01-23 16:52:50 +02:00
metadata_extractor_mvp_PROD.py Fix: Update MAIN_LANGUAGES values array for tabular fields in DAM upload 2026-03-05 17:26:31 +02:00
notifier.py Enhancement: Treat empty A1 folders as expected workflow 2026-04-28 15:20:41 +02:00