Skip to content

Commit

Permalink
Merge pull request #97 from santtu/patch-1
Browse files Browse the repository at this point in the history
Send mail when more than minimum of failures
  • Loading branch information
maxim-kht authored Jun 5, 2018
2 parents 1ab1f82 + c068ec9 commit e01be46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_cron/cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def do(self):
failures += 1
message += 'Job ran at %s : \n\n %s \n\n' % (job.start_time, job.message)

if failures == min_failures:
if failures >= min_failures:
send_mail(
'%s%s failed %s times in a row!' % (
FAILED_RUNS_CRONJOB_EMAIL_PREFIX,
Expand Down

0 comments on commit e01be46

Please sign in to comment.