From 08195803eb123b3a7acf593f3bcff1fb9a441c75 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sat, 23 Dec 2023 12:18:51 +0100 Subject: [PATCH] [ACTIONS] on.schedule: do not cancel jobs The cancelation of jobs is taken care of by handleWorkflows which is called right after handleSchedules with the same event. (cherry picked from commit ad1af2e436f60bc56cbd7528b7e22aa4a2530976) (cherry picked from commit e21252f14740e55aea83d6f4208771060def49ef) --- services/actions/notifier_helper.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/services/actions/notifier_helper.go b/services/actions/notifier_helper.go index 66566a29a7..964d14a19a 100644 --- a/services/actions/notifier_helper.go +++ b/services/actions/notifier_helper.go @@ -461,18 +461,6 @@ func handleSchedules( Content: dwf.Content, } - // cancel running jobs if the event is push - if run.Event == webhook_module.HookEventPush { - // cancel running jobs of the same workflow - if err := actions_model.CancelRunningJobs( - ctx, - run.RepoID, - run.Ref, - run.WorkflowID, - ); err != nil { - log.Error("CancelRunningJobs: %v", err) - } - } crons = append(crons, run) }