dbjobqueue: fix FinishJob not returning an error if already finished
Reported by covscan Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
2543459a7f
commit
ab3990b90a
1 changed files with 1 additions and 1 deletions
|
|
@ -321,7 +321,7 @@ func (q *DBJobQueue) FinishJob(id uuid.UUID, result interface{}) error {
|
|||
var started, finished *time.Time
|
||||
var jobType string
|
||||
canceled := false
|
||||
err = conn.QueryRow(context.Background(), sqlQueryJob, id).Scan(&jobType, nil, &started, nil, &canceled)
|
||||
err = conn.QueryRow(context.Background(), sqlQueryJob, id).Scan(&jobType, nil, &started, &finished, &canceled)
|
||||
if err == pgx.ErrNoRows {
|
||||
return jobqueue.ErrNotExist
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue