-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.4.8, 4.5.4, 5.0
-
None
-
MOODLE_404_STABLE, MOODLE_405_STABLE, MOODLE_500_STABLE
When running the scheduled task core\task\task_lock_cleanup_task, tasks that are marked as failed cannot be logged correctly.
When the clean up task is running, it will detect unfinished running tasks and fail them accordingly. Previous to MDL-84442, it was attempting to log the failure, but would incorrectly attribute the failure to task_lock_cleanup_task.
MDL-84442 has omitted the logging of these failed, unfinished tasks. It will still do all the usual record updates for the failed task (i.e. decrement attempts, update timestamps, etc), but it will be missing from the logs, potentially leaving admins confused about task failures without logs. We need to find a way to log them correctly.
At the time of calling finalise_log, the running task provided to the logger is core\task\task_lock_cleanup_task.
To reproduce (assuming MDL-84442 is integrated):
- Edit core\task\manager.php::cleanup_metadata()
- Change `self::scheduled_task_failed($task, false);` to `self::scheduled_task_failed($task);`
- Run the unit test test_adhoc_cleanup_metadata.
Alternatively, you can follow the reproduction steps found in MDL-84442 if you want to see it bubble-up in the UI. You will still need to do steps 1 and 2.
- has a non-specific relationship to
-
MDL-84442 Task logs for Clean up ad hoc task metadata incorrectly marked as failed
-
- Closed
-