Merge pull request #57 from sgotti/runservice_stop_also_if_result_is_not_set
runservice: stop run also if result is not set
This commit is contained in:
commit
19706fe485
|
@ -120,10 +120,7 @@ func (h *ActionHandler) StopRun(ctx context.Context, req *RunStopRequest) error
|
|||
if r.Phase != types.RunPhaseRunning {
|
||||
return errors.Errorf("run %s is not running but in %q phase", r.ID, r.Phase)
|
||||
}
|
||||
if !r.Result.IsSet() {
|
||||
// stop only if the result is not setted yet
|
||||
r.Stop = true
|
||||
}
|
||||
|
||||
_, err = store.AtomicPutRun(ctx, h.e, r, nil, cgt)
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue