catalyst / moodle-tool_dynamic_cohorts

Moodle dynamic cohorts admin tool
https://moodle.org/plugins/tool_dynamic_cohorts
4 stars 2 forks source link

ah hoc task fail for a rule id that is now deleted #91

Open MURBASLMS opened 2 months ago

MURBASLMS commented 2 months ago

FYI noticed this, rule 32 deleted, wondered if something should be added to code to clean up once rule removed.

Execute adhoc task: tool_dynamic_cohorts\task\process_rule Adhoc task id: 26121557 Adhoc task custom data: 32 ... started 05:32:26. Current memory use 57.6 MB. Debugging increased temporarily due to faildelay of 86400 Processing dynamic cohort rules: processing rule with id 32 ... used 1 dbqueries ... used 0.0017199516296387 seconds Adhoc task failed: tool_dynamic_cohorts\task\process_rule,Argument 1 passed to tool_dynamic_cohorts\rule_manager::process_rule() must be an instance of tool_dynamic_cohorts\rule, bool given, called in /admin/tool/dynamic_cohorts/classes/task/process_rule.php on line 46 Backtrace:

dmitriim commented 2 months ago

Looks like you hit unlikely edge case. But fair point the code should handle that better.