mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
The dispatch job was hidden from the task list by a meta flag the endpoint had to look for on every job in every queue and registry. RQ already has the rule the flag was implementing: `result_ttl=0` deletes a job the moment it succeeds, while a failed one still lands in the failed registry under its own TTL. Registering the scan entry with it drops the marker, the predicate, its four filter sites and the two Redis reads each one cost. The concurrency guard is now one call. `get_blocking_library_scans()` says which scans a second one has to wait for, so the socket handler no longer assembles that rule out of two helpers in two shapes, and `ALL_QUEUES` sits with the queues it lists rather than in the API layer. Also merges the finished and failed registry sweeps, which were the same loop, trims comments that explained the design rather than the code, and drops two socket tests that duplicated their neighbours. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>