catalyst / moodle-tool_dataflows

A generic workflow and processing engine which can be configured to do a large variety of tasks.
GNU General Public License v3.0
11 stars 6 forks source link

Retry logging to be clearer #879

Open keevan opened 3 months ago

keevan commented 3 months ago

Currently it will always log the same message if it attempts to schedule a retry, even if the retry ends up being the normal time the dataflow runs.

But if there is no retry scheduled, it will set the next run to the normal scheduled time. But the prior run will still print "Cron: Rescheduling dataflow to retry", which is a bit misleading.

A suggestion would be to log the counter as well, for example, we would end up with the following cases. Let's assume the step name is "Cron", the retry logic is set to 2 and

https://github.com/catalyst/moodle-tool_dataflows/blob/eb25aa333e06847ebae40faf17c7cc2a6a361e5e/classes/local/step/trigger_cron.php#L347

This will likely require updating the logic for the scheduler method, to clarify behaviour in the logs.