Skip to content
Proud to collaborate with Microsoft for Startups

queue.reap-leases ​

Recover queue items whose lease expired, requeueing them or failing them once their attempt budget is spent. Required for per-key exclusivity to be safe: without it a crashed worker wedges its partition key forever.

Recover items whose worker died holding the lease.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-queue
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuidstringNo——
queue_namestringNo——
limitintegerNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
reapedintegerNo——
itemsjsonNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_layerstringNo——
failed_stepstringNo——
errorstringNo——
error_typestringNo——
reasonstringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—executeAccepted
completedNoYesYes—Completed
failedNoYesNo—Failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompletedRun the queue operation
* (any state)failfailedMark failed

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "queue.reap-leases",
  "initial_data": {
    "organization_uuid": "value",
    "queue_name": "value",
    "limit": 123
  }
}