Skip to content

Commit

Permalink
disable trainingReportTaskDueNotifications by requiring env var
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Powell committed Nov 27, 2024
1 parent bac8e5e commit bbe661a
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 bbe661a

Please sign in to comment.