Startup deletes the work queue's keys from before it moved from pipeline: to queue: (stream, timers, dead letters, parked lists, done markers), logged with what they held; an old stream still holding undelivered work stays, is logged as an error, and counts as queued work for the keys it names

This commit is contained in:
2026-11-03 07:55:14 +01:00
parent 3ae5255617
commit f9d5f510c2
4 changed files with 153 additions and 2 deletions
+6
View File
@@ -48,6 +48,11 @@ HELD = "__held__"
FLUSH = "__flush__"
#: What an engine-shipped node type remembers (`Node.remember`).
NODE_STATE = "__node__"
#: Not state: the work queue's stream from before the queue had a root of its
#: own. Startup deletes it unless it holds work nobody delivered
#: (`RedisWorkQueue.drop_legacy`). Kept, it names no flow's state, and the
#: queue counts that work as queued instead.
LEGACY_QUEUE = "__queue__"
#: A qualified message or node name, ``<flow key>.<name>``.
NAME = "name"
@@ -72,6 +77,7 @@ FAMILIES: dict[str, tuple[str, ...]] = {
HELD: (NAME,),
FLUSH: (NAME,),
NODE_STATE: (NAME, PRIVATE),
LEGACY_QUEUE: (),
}
#: What each `WorkItem` field holds that a rename changes, or None. A guard is