Skip to content

Commit 5486690

Browse files
committed
skip redundant workflow run status update
1 parent 43e1e02 commit 5486690

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

routers/web/repo/actions/view.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -420,14 +420,11 @@ func Rerun(ctx *context_module.Context) {
420420
return
421421
}
422422

423-
// reset run's start stop time and status if it is done
423+
// reset run's start and stop time when it is done
424424
if run.Status.IsDone() {
425425
run.PreviousDuration = run.Duration()
426426
run.Started = 0
427427
run.Stopped = 0
428-
// Set run to waiting status so next job.Status evaluations reflect the status after the re-run trigger
429-
// Avoid re-triggering email notification before the new job run ends
430-
run.Status = 1
431428
if err := actions_model.UpdateRun(ctx, run, "started", "stopped", "previous_duration"); err != nil {
432429
ctx.ServerError("UpdateRun", err)
433430
return
@@ -437,7 +434,6 @@ func Rerun(ctx *context_module.Context) {
437434
ctx.ServerError("run.LoadAttributes", err)
438435
return
439436
}
440-
notify_service.WorkflowRunStatusUpdate(ctx, run.Repo, run.TriggerUser, run)
441437
}
442438

443439
job, jobs := getRunJobs(ctx, runIndex, jobIndex)

0 commit comments

Comments
 (0)