[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.
This commit is contained in:
parent
0b40ca1ea5
commit
ad1af2e436
|
@ -460,18 +460,6 @@ func handleSchedules(
|
||||||
Content: dwf.Content,
|
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)
|
crons = append(crons, run)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue