-
Improvement
-
Resolution: Fixed
-
Minor
-
Future Dev
-
MOODLE_404_STABLE
-
MDL-79128-main -
-
6
-
Team Hedgehog 2023 Sprint 3.3, Team Hedgehog 2023 Review 3, Team Hedgehog 2023 Sprint 4.1, Team Hedgehog 2023 Sprint 4.2, Team Hedgehog 2023 Sprint 4.3
Not every adhoc task is idempotent and there are times when an adhoc task should not retry when it fails. An example of this is a failed course restore (MDL-75579).
Ad-hoc tasks should be able to declare that they are "run once", and implement a method (such as allow_retry(): bool) to declare this.
We should still keep the ability to re-run these tasks from the UI and CLI, as we can for existing ad-hoc tasks. This will help with some recovery and debugging ops for failed tasks.
We should periodically clean up failed tasks. Currently adhoc task records are removed from the database when they successfully complete. As we will now have permanently failed tasks, these will need to be periodically cleaned up. Possibly reusing the existing metadata cleanup or task log cleanup task (along with the existing retention periods).
- blocks
-
MDL-79130 Tasks: Ad-hoc tasks shouldn't retry after max fail delay
- Closed
-
MDL-80267 Asynchronous restore keeps deleting course/student content - Using no-retry flag
- Closed
- caused a regression
-
MDL-81494 Missing extra space of query in \core\cron::run_failed_adhoc_tasks
- Closed
- has been marked as being related by
-
MDL-70854 New api to allow adhoc tasks to communicate a progress bar / status back to the calling page
- Closed
- is child of
-
IDEA-211 Task API Improvements
- Closed
- will help resolve
-
MDL-72729 Disabling forum posts message provider causes related adhoc task to continually fail/requeue
- Open
-
MDL-79333 Ad-hoc tasks are never deleted despite repeated fails
- Closed