mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-03 01:17:00 +00:00
call EmitJobsIfReady when cancelling a run
This commit is contained in:
parent
e6d25e2f75
commit
dc86086a4a
@ -602,6 +602,14 @@ func Cancel(ctx *context_module.Context) {
|
||||
|
||||
actions_service.CreateCommitStatus(ctx, jobs...)
|
||||
|
||||
run, err := actions_model.GetRunByIndex(ctx, ctx.Repo.Repository.ID, runIndex)
|
||||
if err != nil {
|
||||
ctx.ServerError("GetRunByIndex", err)
|
||||
}
|
||||
if err := actions_service.EmitJobsIfReady(run.ID); err != nil {
|
||||
log.Error("Emit ready jobs of run %d: %v", run.ID, err)
|
||||
}
|
||||
|
||||
for _, job := range updatedjobs {
|
||||
_ = job.LoadAttributes(ctx)
|
||||
notify_service.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, nil)
|
||||
|
Loading…
Reference in New Issue
Block a user