Ensure runs are sorted

This commit is contained in:
shamoon 2024-11-22 13:30:16 -08:00
parent 8ba5b535c3
commit ad52a27adf

View File

@ -375,7 +375,7 @@ def check_scheduled_workflows():
document=document,
type=WorkflowTrigger.WorkflowTriggerType.SCHEDULED,
workflow=workflow,
)
).order_by("-run_at")
if not trigger.schedule_is_recurring and workflow_runs.exists():
# schedule is non-recurring and the workflow has already been run
logger.debug(