-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Implement auto-cancellation of concurrent jobs if the event is push #25716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
a20c5c3
a1b22e2
f066eb0
b64ed17
e318f28
251be01
edeb7af
2db7378
f383d9e
1b16a52
a7ed008
18cd66f
05f078d
6b6b17c
231e237
c542d1b
d3edc58
2412e84
5d78596
b0ab570
d7b577f
1af0878
e767742
9ab6ec4
d649e95
face538
8a05c67
a79384d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -232,6 +232,12 @@ func notify(ctx context.Context, input *notifyInput) error { | |
log.Error("jobparser.Parse: %v", err) | ||
continue | ||
} | ||
|
||
// auto cancel running jobs in the same workflow | ||
if err := actions_model.CancelRunningJobs(ctx, run); err != nil { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So it will cancel the previous jobs of the same ref by default, I'm OK with this, and we can provide an options later if someone ask for it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @wolfogre Yes, move to another NEW PR. |
||
log.Error("CancelRunningJobs: %v", err) | ||
} | ||
|
||
if err := actions_model.InsertRun(ctx, run, jobs); err != nil { | ||
log.Error("InsertRun: %v", err) | ||
continue | ||
|
Uh oh!
There was an error while loading. Please reload this page.