mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #08225
[Bug 685640] A change has been merged
Reviewed: https://reviews.mahara.org/1054
Committed: http://gitorious.org/mahara/mahara/commit/ae76bab037afe6af75c5180bc3137d5770df316f
Submitter: Francois Marier (francois@xxxxxxxxxxxxxxx)
Branch: master
commit ae76bab037afe6af75c5180bc3137d5770df316f
Author: Richard Mansfield <richard.mansfield@xxxxxxxxxxxxxxx>
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 <richard.mansfield@xxxxxxxxxxxxxxx>
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/685640
Title:
If a cron function causes an exception, it's lock isn't removed
Status in Mahara ePortfolio:
Fix Committed
Bug description:
Came across this whilst looking at #685633 but thought that it deserved a separate bug.
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.
Whilst this is possibly correct in some fashions -- e.g. broken crons aren't run endlessly to no point, some crons may cause an exception once in a while which isn't a major issue but shouldn't mean that the cron doesn't take place for another 24 hours.
For example, network issues will probably cause the cron_check_for_updates cron to fail, but this could be a transient issue.
Not sure whether it's best to catch the errors and alert an
administrator but still keep the lock in place (to prevent the admin
from being spammed), or to catch the errors and assume that they may
be transient and try again, or some other solution...
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/685640/+subscriptions
References