actionhero / node-resque

Node.js Background jobs backed by redis.
https://node-resque.actionherojs.com
Apache License 2.0
1.37k stars 151 forks source link

Use watch to ensure that cleanupTimetamps doesn't delete a delayed queue as a new job is being writtten #317

Closed evantahler closed 4 years ago

evantahler commented 4 years ago

It is possible that cleanupTimestamps would delete a queue if a new job is inserted after the llen read. We can prevent this with an optimisitc-lock

https://github.com/NodeRedis/node-redis#optimistic-locks

evantahler commented 4 years ago

See https://github.com/actionhero/node-resque/pull/318