Merge pull request #253 from camandel/remove_waitapprove_if_stopped
Remove WaitingApproval for stopped tasks
This commit is contained in:
commit
097caaf871
|
@ -127,6 +127,9 @@ func (h *ActionHandler) StopRun(ctx context.Context, req *RunStopRequest) error
|
||||||
return errors.Errorf("run %s is not running but in %q phase", r.ID, r.Phase)
|
return errors.Errorf("run %s is not running but in %q phase", r.ID, r.Phase)
|
||||||
}
|
}
|
||||||
r.Stop = true
|
r.Stop = true
|
||||||
|
for _, t := range r.TasksWaitingApproval() {
|
||||||
|
r.Tasks[t].WaitingApproval = false
|
||||||
|
}
|
||||||
|
|
||||||
_, err = store.AtomicPutRun(ctx, h.e, r, nil, cgt)
|
_, err = store.AtomicPutRun(ctx, h.e, r, nil, cgt)
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue