client.dlq
client.dlq.delete
The dlq.delete method deletes one or more workflow runs from the Dead Letter Queue (DLQ).
Arguments
You can delete DLQ entries by ID, by an array of IDs, or by filters.
By DLQ ID
Pass a single DLQ ID or an array of IDs directly:
await client.dlq.delete("dlq-123");await client.dlq.delete(["dlq-123", "dlq-456"]);Or as an object with dlqIds:
await client.dlq.delete({ dlqIds: ["dlq-123", "dlq-456"] });By filters
filterbodyobject
countbodynumber
Maximum number of messages to process per call. Defaults to 100.
cursorbodystring
A pagination cursor from a previous request.
Delete all
allbodyboolean
Set to true to delete all DLQ entries.
Response
deletednumber
The number of DLQ entries that were deleted.
cursorstring
A pagination cursor. If not returned, all matching entries have been processed.
Usage
Single
await client.dlq.delete("dlq-123");Multiple
await client.dlq.delete(["dlq-123", "dlq-456"]);By filters
// delete by labellet cursor: string | undefined;do { const result = await client.dlq.delete({ filter: { label: "my-label" }, cursor, }); cursor = result.cursor;} while (cursor);All
let cursor: string | undefined;do { const result = await client.dlq.delete({ all: true, cursor }); cursor = result.cursor;} while (cursor);