chainmq 1.3.0

A Redis-backed, type-safe job queue for Rust. Provides job registration and execution, delayed jobs, retries with backoff, and scalable workers.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-- lua/claim_job.lua
-- Atomically claim a job from waiting queues (priority + FIFO/LIFO buckets, then legacy wait) and move to active.
-- KEYS[1..n-1] = wait lists in claim order (RPOP from each), KEYS[n] = active_key

local n = #KEYS
local active_key = KEYS[n]

for i = 1, n - 1 do
    local job_id = redis.call('rpop', KEYS[i])
    if job_id then
        redis.call('sadd', active_key, job_id)
        return job_id
    end
end

return nil