Add force flag to weekly post handler for manual testing

This commit is contained in:
Adam Moussa 2026-04-07 18:58:03 -04:00
parent b0aec78b8f
commit f8ceb1dc83

View file

@ -138,7 +138,8 @@ def handler(event, context):
now = datetime.now(EASTERN)
# DST guard — same pattern as the 3CX scheduler
if now.hour != 7:
force = event.get("force", False)
if not force and now.hour != 7:
logger.info("ET hour is %d, not 7am — skipping (wrong DST rule fired)", now.hour)
return {"skipped": True}