JoobQ::DeadLetterQueue
Inherits Reference < Object
Operator view of the dead-letter set: paged reads, redrive and purge. Each state change is one atomic Lua step, so two operators can never redrive or purge the same entry twice.
Constants
Adds members (ARGV[2..], scored ARGV[1]) to the set. A member that is already there is not counted again.
The queue an entry belongs to, read the way parse reads it: from the entry itself, never from the caller.
The set's size and the counts, read together; and the counts rebuilt from the set (for data written before they existed). The rebuild blocks Redis for as long as the scan takes, so it runs only when the two disagree.
Moves one entry back onto its queue; 0 when someone else got there first, -1 when the queue's key holds something that is not a list (nothing is touched then: a failure after the ZREM would lose the entry).
Removes members (ARGV) from the set and from the counts; returns how many were there.
Entries whose JSON has no queue are counted under this name, so the counts always add up to the set.
Constructors
Class methods
Every writer to the set goes through here, so the counts stay exact. Members already present are not counted twice; returns how many were new.
Instance methods
Entries per queue without reading them. If the counts do not add up to the set (entries written by code that predates them), they are rebuilt once.
Newest first. queue filters; offset/limit page through the matches.
Replay precisely the member an operator reviewed. The Lua transition consumes that member, so a replacement between lookup and EVAL conflicts.