check worker for unkown tasks
This commit is contained in:
parent
a9d901da71
commit
7574628a1d
1 changed files with 1 additions and 1 deletions
|
@ -180,7 +180,7 @@ func updateWorkerTaskStatus(ctx context.Context) {
|
|||
if Workers[uuid].Connected {
|
||||
w := Workers[uuid]
|
||||
|
||||
rows, err := db.Query(ctx, "SELECT id, COALESCE(CARDINALITY(log),0) as log_offset FROM tasks WHERE worker_id = $1 AND (status = $2 OR status = $3 OR status = $4)", uuid, constants.TASK_STATUS_ASSIGNED, constants.TASK_STATUS_RUNNING, constants.TASK_STATUS_WAITING)
|
||||
rows, err := db.Query(ctx, "SELECT id, COALESCE(CARDINALITY(log),0) as log_offset FROM tasks WHERE worker_id = $1 AND (status = $2 OR status = $3 OR status = $4 OR status = $5)", uuid, constants.TASK_STATUS_UNKNOWN, constants.TASK_STATUS_ASSIGNED, constants.TASK_STATUS_RUNNING, constants.TASK_STATUS_WAITING)
|
||||
if err != nil {
|
||||
slog.ErrorContext(ctx, "Error Getting Tasks for Worker", "err", err, "worker_id", uuid)
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue