Add missing Return
This commit is contained in:
parent
6df0d49249
commit
93cd12c6b6
1 changed files with 2 additions and 3 deletions
|
@ -204,14 +204,14 @@ func updateWorkerTaskStatus(ctx context.Context) {
|
|||
// Find better way to compare errors which where send via websocket
|
||||
if strings.HasSuffix(err.Error(), constants.ErrTaskDoesNotExist.Error()) {
|
||||
// Worker says it does not know of this task, mark it failed so that we don't asks the worker about it again and again
|
||||
slog.ErrorContext(ctx, "Task is unkown by worker, Failing...", "err", err)
|
||||
slog.ErrorContext(ctx, "Task is unknown by worker, Failing...", "err", err)
|
||||
|
||||
_, err = db.Exec(ctx, "UPDATE tasks SET status = $2, log = log || $3 WHERE id = $1", ts.Task.ID, constants.TASK_STATUS_FAILED, []string{"Task Failed because it is unkown to Assigned Worker"})
|
||||
if err != nil {
|
||||
slog.ErrorContext(ctx, "Updating Failed Task Status", "err", err)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
} else if err != nil {
|
||||
slog.ErrorContext(ctx, "Getting Task Status", "err", err)
|
||||
|
||||
|
@ -220,7 +220,6 @@ func updateWorkerTaskStatus(ctx context.Context) {
|
|||
slog.ErrorContext(ctx, "Updating Unknown Task Status", "err", err)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue