Skip to content

Commit

Permalink
Merge pull request #2502 from HHS/ttahub-3600/allow_disabling_email_jobs
Browse files Browse the repository at this point in the history
disable trainingReportTaskDueNotifications by requiring env var
  • Loading branch information
hardwarehuman authored Nov 27, 2024
2 parents f52ae0c + bbe661a commit 8f5b3cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/cron.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ const runDailyEmailJob = () => {
await submittedDigest(EMAIL_DIGEST_FREQ.DAILY, DIGEST_SUBJECT_FREQ.DAILY);
await approvedDigest(EMAIL_DIGEST_FREQ.DAILY, DIGEST_SUBJECT_FREQ.DAILY);
await recipientApprovedDigest(EMAIL_DIGEST_FREQ.DAILY, DIGEST_SUBJECT_FREQ.DAILY);
await trainingReportTaskDueNotifications(EMAIL_DIGEST_FREQ.DAILY);
if (process.env.SEND_TRAININGREPORTTASKDUENOTIFICATION === 'true') {
await trainingReportTaskDueNotifications(EMAIL_DIGEST_FREQ.DAILY);
}
} catch (error) {
auditLogger.error(`Error processing Daily Email Digest job: ${error}`);
logger.error(`Daily Email Digest Error: ${error}`);
Expand Down

0 comments on commit 8f5b3cb

Please sign in to comment.