runservice: stop run also if result is not set

This commit is contained in:
Simone Gotti 2019-07-23 12:11:01 +02:00
parent ea3e0d1d7c
commit 75d68b2b52
1 changed files with 1 additions and 4 deletions

View File

@ -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
}
r.Stop = true
_, err = store.AtomicPutRun(ctx, h.e, r, nil, cgt)
return err