fix(jobs): gate lifecycle-email cron to prod host only #97

Merged
root merged 1 commits from fix/lifecycle-cron-prod-only into main 2026-06-04 12:44:03 +03:00
Owner

dev.sase.tr was sending duplicate lifecycle e-mails to real customers (sase_dev is a copy of prod). Mirrors the existing isCatalogBackfillEnabled() gate. After merge + deploy, the dev cron auto-disables (no env tweak needed); LIFECYCLE_EMAIL_ENABLED=true can force-enable for staging tests.

dev.sase.tr was sending duplicate lifecycle e-mails to real customers (sase_dev is a copy of prod). Mirrors the existing `isCatalogBackfillEnabled()` gate. After merge + deploy, the dev cron auto-disables (no env tweak needed); `LIFECYCLE_EMAIL_ENABLED=true` can force-enable for staging tests.
root added 1 commit 2026-06-04 12:38:11 +03:00
fix(jobs): gate lifecycle-email cron behind prod-host check
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
7e5e0ee446
dev.sase.tr was running the daily lifecycle-email cron (trial-ending,
win-back) against sase_dev, which is a seeded copy of the prod DB —
real customers were getting duplicate mails (one from prod, one from
dev). Mirror the isCatalogBackfillEnabled() gate so the lifecycle cron
only registers on the canonical prod host (COOLIFY_FQDN=sase.tr or
BETTER_AUTH_URL=https://sase.tr). LIFECYCLE_EMAIL_ENABLED env can force-
enable for staging testing. The else branch removes any stale scheduler
from Redis so a previously-registered cron stops firing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
root merged commit b670d39d8f into main 2026-06-04 12:44:03 +03:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: root/sase.tr#97