Commit 486456d6 authored by David Monllaó's avatar David Monllaó
Browse files

Merge branch 'MDL-51109-28' of git://github.com/danpoltawski/moodle into MOODLE_28_STABLE

parents 6b6905b6 56a1ac4d
......@@ -149,6 +149,14 @@ if ($execute = $options['execute']) {
mtrace("... used " . ($DB->perf_get_queries() - $predbqueries) . " dbqueries");
mtrace("... used " . (microtime(true) - $pretime) . " seconds");
mtrace("Task failed: " . $e->getMessage());
if ($CFG->debugdeveloper) {
if (!empty($e->debuginfo)) {
mtrace("Debug info:");
mtrace($e->debuginfo);
}
mtrace("Backtrace:");
mtrace(format_backtrace($e->getTrace(), true));
}
\core\task\manager::scheduled_task_failed($task);
get_mailer('close');
exit(1);
......
......@@ -91,6 +91,14 @@ function cron_run() {
mtrace("... used " . (microtime(1) - $pretime) . " seconds");
}
mtrace("Scheduled task failed: " . $task->get_name() . "," . $e->getMessage());
if ($CFG->debugdeveloper) {
if (!empty($e->debuginfo)) {
mtrace("Debug info:");
mtrace($e->debuginfo);
}
mtrace("Backtrace:");
mtrace(format_backtrace($e->getTrace(), true));
}
\core\task\manager::scheduled_task_failed($task);
}
get_mailer('close');
......@@ -127,6 +135,14 @@ function cron_run() {
mtrace("... used " . (microtime(1) - $pretime) . " seconds");
}
mtrace("Adhoc task failed: " . get_class($task) . "," . $e->getMessage());
if ($CFG->debugdeveloper) {
if (!empty($e->debuginfo)) {
mtrace("Debug info:");
mtrace($e->debuginfo);
}
mtrace("Backtrace:");
mtrace(format_backtrace($e->getTrace(), true));
}
\core\task\manager::adhoc_task_failed($task);
}
get_mailer('close');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment