Skip to content

Commit

Permalink
Merge branch 'MDL-70357-39-cronlibthrowables' of git://github.com/mud…
Browse files Browse the repository at this point in the history
…rd8mz/moodle into MOODLE_39_STABLE
  • Loading branch information
sarjona committed Dec 15, 2020
2 parents 8a733bc + 6e04f9f commit 0f53bd6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/cronlib.php
Expand Up @@ -182,7 +182,7 @@ function cron_run_adhoc_tasks(int $timenow, $keepalive = 0, $checklimits = true)

try {
$task = \core\task\manager::get_next_adhoc_task(time(), $checklimits);
} catch (Exception $e) {
} catch (\Throwable $e) {
if ($adhoclock) {
// Release the adhoc task runner lock.
$adhoclock->release();
Expand Down Expand Up @@ -255,7 +255,7 @@ function cron_run_inner_scheduled_task(\core\task\task_base $task) {
}
mtrace('Scheduled task complete: ' . $fullname);
\core\task\manager::scheduled_task_complete($task);
} catch (Exception $e) {
} catch (\Throwable $e) {
if ($DB && $DB->is_transaction_started()) {
error_log('Database transaction aborted automatically in ' . get_class($task));
$DB->force_transaction_rollback();
Expand Down Expand Up @@ -340,7 +340,7 @@ function cron_run_inner_adhoc_task(\core\task\adhoc_task $task) {
}
mtrace("Adhoc task complete: " . get_class($task));
\core\task\manager::adhoc_task_complete($task);
} catch (Exception $e) {
} catch (\Throwable $e) {
if ($DB && $DB->is_transaction_started()) {
error_log('Database transaction aborted automatically in ' . get_class($task));
$DB->force_transaction_rollback();
Expand Down

0 comments on commit 0f53bd6

Please sign in to comment.