fsjobqueue: make canceling a finished job an error
This mirrors FinishJob(), which also errors when the job is already finished.
This commit is contained in:
parent
30492bfc60
commit
871c6e9cbb
2 changed files with 4 additions and 3 deletions
|
|
@ -298,7 +298,7 @@ func (q *fsJobQueue) CancelJob(id uuid.UUID) error {
|
|||
}
|
||||
|
||||
if !j.FinishedAt.IsZero() {
|
||||
return nil
|
||||
return jobqueue.ErrNotRunning
|
||||
}
|
||||
|
||||
j.Canceled = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue