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
Main run: "Cron: Retrying run at 2024-04-21 09:00:00"
First retry: "Cron: Retry 1 of 2 done. Retrying run at 2024-04-21 09:00:00"
Second and last retry: "Cron: Retry 2 of 2 done. No longer retrying."
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.