fix appending error to log

This commit is contained in:
speatzle 2024-05-21 16:39:34 +02:00
parent d2212e2478
commit 6df0d49249

View file

@ -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
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 {
slog.ErrorContext(ctx, "Updating Failed Task Status", "err", err)
return