mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'MDL-68768-adhoc-task-faildelay-check' of https://github.com/brendanheywood/moodle
This commit is contained in:
commit
d9df954a25
2 changed files with 34 additions and 0 deletions
|
@ -79,6 +79,19 @@ class maxfaildelay extends check {
|
|||
}
|
||||
}
|
||||
|
||||
$tasks = \core\task\manager::get_failed_adhoc_tasks();
|
||||
foreach ($tasks as $task) {
|
||||
$faildelay = $task->get_fail_delay();
|
||||
if ($faildelay > $maxdelay) {
|
||||
$maxdelay = $faildelay;
|
||||
}
|
||||
if ($faildelay > 0) {
|
||||
$failures++;
|
||||
$details .= get_string('faildelay', 'tool_task') . ': ' . format_time($faildelay);
|
||||
$details .= ' - ' .get_class($task) . " ID = " . $task->get_id() ."<br>";
|
||||
}
|
||||
}
|
||||
|
||||
if ($failures > 0) {
|
||||
// Intermittent failures are not yet a warning.
|
||||
$status = result::INFO;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue