From 81a7899fde0b0decc39a2a67463de36a94d7a79b Mon Sep 17 00:00:00 2001 From: Zettat123 Date: Thu, 16 Jan 2025 10:42:51 +0800 Subject: [PATCH] fix schedule --- services/actions/schedule_tasks.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/services/actions/schedule_tasks.go b/services/actions/schedule_tasks.go index 4f6cc47036..afa6aac7f4 100644 --- a/services/actions/schedule_tasks.go +++ b/services/actions/schedule_tasks.go @@ -143,6 +143,20 @@ func CreateScheduleTask(ctx context.Context, cron *actions_model.ActionSchedule) if err != nil { return err } + wfRawConcurrency, err := jobparser.ReadWorkflowRawConcurrency(cron.Content) + if err != nil { + return err + } + if wfRawConcurrency != nil { + wfConcurrencyGroup, wfConcurrencyCancel, err := EvaluateWorkflowConcurrency(run, wfRawConcurrency, vars) + if err != nil { + return err + } + if wfConcurrencyGroup != "" { + run.ConcurrencyGroup = wfConcurrencyGroup + run.ConcurrencyCancel = wfConcurrencyCancel + } + } // Insert the action run and its associated jobs into the database if err := InsertRun(ctx, run, workflows); err != nil {