Requeue Queue Job

Queue operator access

Configure durable execution with QueueConfig(durable=True) and a queue worker on this replica. Without the active queue surface, these routes return 503.

When a JWT or PAT identity is present, these operator routes require the configured admin scope, even if user isolation or general authorization is disabled. Security-key and open instances pass this operator gate. Job rows can include cross-user payloads; these are operator APIs, not a user's run-status feed.

Requeue conditions

Only terminal failed or cancelled jobs can be requeued. A missing or non-requeueable job returns 400. A recently failed job returns 409 during its lock-grace window unless force=true is supplied.

Current execution has write fences; the generated explanation referring to unfenced writes is stale. The grace gate still avoids immediately spending another attempt while the previous worker may be finishing. force=true deliberately overrides that wait.

For a cancelled job, clear_cancellation=true explicitly overrides retained cancellation intent. Without it, the new attempt can be cancelled again at its next checkpoint. These flags do not make a successful requeue a completed run; monitor the returned job.

POST/queue/jobs/{job_id}/requeue

Requeue a terminally failed or cancelled job for one more execution (raises its attempt budget by one). The operator remedy for crashed runs under the no-silent-re-execution default. Requeueing a CANCELLED job whose cancellation intent is still live requires clear_cancellation=true - an explicit override of the recorded cancel; without it the re-driven attempt is re-cancelled at its first checkpoint. Requeueing a job that FAILED within the last lock_grace seconds requires force=true: its worker may still be executing (swept-but-alive), and a second producer would race unfenced writes.

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Path Parameters

job_id*Job Id

Query Parameters

clear_cancellation?Clear Cancellation
Defaultfalse
force?Force
Defaultfalse

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl --request POST 'https://example.com/queue/jobs/string/requeue'
{  "id": "string",  "component_type": "string",  "component_id": "string",  "session_id": "string",  "job_type": "run",  "user_id": "string",  "payload": {},  "status": "string",  "attempt": 0,  "max_attempts": 1,  "idempotency_key": "string",  "available_at": 0,  "locked_by": "string",  "locked_at": 0,  "error": "string",  "created_at": 0,  "updated_at": 0,  "completed_at": 0}