opschain admin queue sweep
Included from Basic tier
Discards every parked queue entry whose owning work item is already
finalised: the crash-window leftovers no cancel lane will ever
clear, because their owner finished without its entry being discarded.
The sweep touches nothing else — a leased entry, an entry whose owner is
live, and an entry whose owner cannot be resolved are all left alone, and
no owner is cancelled (there is nothing left to cancel). Each swept run
writes a customer-visible api:admin_queue:sweep audit event naming the
administrator, the discarded entries and the finalised owner.
Flags
| Flag | Meaning |
|---|---|
--server <url> | Server base URL (default: the active context / OPSCHAIN_SERVER). |
--auth-token <token> | Admin bearer token override (default: your opschain login session, then $OPSCHAIN_ADMIN_TOKEN, then the token stored by opschain admin login). |
Admin-token gated like opschain admin queue (the /admin updatable
grant). -o json|yaml prints the swept entries in their wire shape.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Sweep ran; stdout reports the swept entries (or that none were orphaned). |
| 1 | Request failed or the token was refused. |
| 2 | Usage error — missing server or token. |
Examples
opschain admin queue sweep --server https://ops.example.com
swept 1 orphaned queue entries
RUN OWNER STATUS TARGET CHAIN STATE REASON
01a1f4d9 change cancelled /projects/demo/envs/prod 01a1f4d9 parked no live runner satisfies the placement requirement
A second sweep immediately after reports no orphaned queue entries.
See also
opschain docs cli/admin-queue-list— spot orphans (a parked entry with a finalised OWNER STATUS).opschain docs cli/admin-queue-terminate— entries whose owner is still live.