Merge branch 'MDL-78437-cleanup-metadata' of https://github.com/bwalkerl/moodle

This commit is contained in:
Huong Nguyen
2025-09-15 09:03:33 +07:00
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -1473,6 +1473,9 @@ class manager {
$task = self::scheduled_task_from_record($taskrecord);
$task->set_lock($lock);
$displayname = $task->get_name() . ' (' . get_class($task) . ')';
mtrace("Marking orphaned scheduled task as failed: $displayname");
// We have to skip log finalisation when failing the task as the finalise_log method from
// the log manager is only aware of the current running task (i.e., the cleanup task).
self::scheduled_task_failed($task, false);
@@ -1488,6 +1491,9 @@ class manager {
$task = self::adhoc_task_from_record($taskrecord);
$task->set_lock($lock);
$displayname = get_class($task) . ' (adhoc task id ' . $task->get_id() . ')';
mtrace("Marking orphaned adhoc task as failed: $displayname");
// We have to skip log finalisation when failing the task as the finalise_log method from
// the log manager is only aware of the current running task (i.e., the cleanup task).
self::adhoc_task_failed($task, false);
+2 -2
View File
@@ -413,8 +413,8 @@ $tasks = array(
[
'classname' => 'core\task\task_lock_cleanup_task',
'blocking' => 0,
'minute' => 'R',
'hour' => '0',
'minute' => '*/10',
'hour' => '*',
'day' => '*',
'dayofweek' => '*',
'month' => '*'