fix appending error to log
This commit is contained in:
parent
d2212e2478
commit
6df0d49249
1 changed files with 1 additions and 1 deletions
|
@ -206,7 +206,7 @@ func updateWorkerTaskStatus(ctx context.Context) {
|
||||||
// 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
|
// 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 unkown 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, "Task Failed because it is unkown to Assigned Worker")
|
_, 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 {
|
if err != nil {
|
||||||
slog.ErrorContext(ctx, "Updating Failed Task Status", "err", err)
|
slog.ErrorContext(ctx, "Updating Failed Task Status", "err", err)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue