- redis.call('zRem',kClaimed,uuid)
- redis.call('hDel',kAttempts,uuid)
+ local removed = redis.call('zRem',kClaimed,id)
+ -- Check if the job was recycled
+ if removed == 0 then
+ return 0
+ end
+ -- Delete the retry data
+ redis.call('hDel',kAttempts,id)