Skip to content

Commit

Permalink
feat: add safety assert before adding batch email job
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasLaPiana committed May 16, 2023
1 parent a264b4b commit d6b3275
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ def initiate_scheduled_batch_email_send() -> None:
if CONFIG.test_mode:
return

assert scheduler.running, "Scheduler is not running! Cannot add Batch Email job."

logger.info("Initiating scheduler for batch email send")
scheduler.add_job(
func=send_email_batch,
Expand Down

0 comments on commit d6b3275

Please sign in to comment.