Follow-up from "Prevent concurrent execution of PipelineScheduleWorker"

The following discussion from !27781 (merged) should be addressed:

  • @dosuken123 started a discussion:

    If schedule.schedule_next_run! raises an exception by statement timeout, the schedule's next_run_at will stay the same but a new pipeline has already been created. This means the worker could create duplicate pipelines in that case.

    We should update the schedule_next_run at first in order to prevent this case.