commit ae76bab037afe6af75c5180bc3137d5770df316f
Author: Richard Mansfield <email address hidden>
Date: Thu Feb 16 10:45:02 2012 +1300
Try to remove lock when exception thrown in cron function (bug #685640)
If a cron function causes an exception for whatever reason, then the
cron will stop, but the lock isn't removed. The job then isn't tried
again for another 24 hours.
Instead we should try to set the next run time and remove the lock.
Cron functions that run frequently, but fail due to some temporary
problem, will not be forced to stop for 24 hours. On the other hand,
very frequent cron functions that throw exceptions on every run will
be spammy.
Obviously, this change has no effect on cron functions that fail due
to script timeouts, out-of-memory errors, or which exit for any other
reason.
Change-Id: I3bfe08c2ebba62cbd82045e66438a6442d1f1fe8
Signed-off-by: Richard Mansfield <email address hidden>
Reviewed: https:/ /reviews. mahara. org/1054 gitorious. org/mahara/ mahara/ commit/ ae76bab037afe6a f75c5180bc3137d 5770df316f
Committed: http://
Submitter: Francois Marier (<email address hidden>)
Branch: master
commit ae76bab037afe6a f75c5180bc3137d 5770df316f
Author: Richard Mansfield <email address hidden>
Date: Thu Feb 16 10:45:02 2012 +1300
Try to remove lock when exception thrown in cron function (bug #685640)
If a cron function causes an exception for whatever reason, then the
cron will stop, but the lock isn't removed. The job then isn't tried
again for another 24 hours.
Instead we should try to set the next run time and remove the lock.
Cron functions that run frequently, but fail due to some temporary
problem, will not be forced to stop for 24 hours. On the other hand,
very frequent cron functions that throw exceptions on every run will
be spammy.
Obviously, this change has no effect on cron functions that fail due
to script timeouts, out-of-memory errors, or which exit for any other
reason.
Change-Id: I3bfe08c2ebba62 cbd82045e66438a 6442d1f1fe8
Signed-off-by: Richard Mansfield <email address hidden>