-- KEYS[1]: this consumer's inflight set
-- KEYS[2]: the active jobs list
-- KEYS[3]: the signal list
-- ARGV[]: the list of job IDs
-- Returns: nil
for_,job_idinipairs(ARGV)do-- Remove the jobs from this consumer's inflight set
localremoved=redis.call("srem",KEYS[1],job_id)ifremoved==1then-- Push the job back into the active jobs list
redis.call("rpush",KEYS[2],job_id)endend-- Signal that there are jobs in the queue
redis.call("del",KEYS[3])redis.call("lpush",KEYS[3],1)returntrue