Skip to main content

Sweep every Claimed task whose lease has expired back to Pending

POST 

/task-lease-expirations

The Clock-driven side of the at-most-once lease design: scans every Claimed task and, for each whose lease expiry has passed without a renewal or completion, frees it back to Pending (publishing LeaseExpired) so the work is never silently lost. A collection- level action on the tasks resource — not scoped to a single task id — analogous to how /tasks/{id}/completions is a single-resource action; deliberately not placed under an unscoped /admin path. Idempotent: a second call simply frees nothing new if nothing else has expired since the last sweep. Takes no request body.

Request​

Responses​

Sweep completed; body reports how many tasks were freed.

Response Headers
    Idempotency-Replayed

    Present, with the value true, ONLY when this answer is the stored replay of an earlier request that used the same Idempotency-Key (the handler did not run again). The first execution never carries it.