Automattic / kue

Kue is a priority job queue backed by redis, built for node.js.
http://automattic.github.io/kue
MIT License
9.45k stars 862 forks source link

Convert watchStuckJobs implementation to use SCAN instead of KEYS #1174

Open taywrobel opened 6 years ago

taywrobel commented 6 years ago

Adjusts the implementation of the watchStuckJobs LUA script to use a paginated SCAN of the keyspace, rather than the current KEYS approach.

This has a significant impact in large or shared redis deployments where the keyspace can be unbounded in size. KEYS will block all execution as it runs, which can take several seconds or longer whereas the SCAN approach permits other operations to be run in between each page of results.

vjustov commented 6 years ago

👍 when could this be reviewd or merged?

snypelife commented 5 years ago

This is a pretty gnarly issue. Any chance this PR could get some traction?

niclic commented 5 years ago

Last commit to master in January 2018? Don't hold your breath. @snypelife

snypelife commented 5 years ago

womp womp 👎

rahulroy9202 commented 5 years ago

bump

igauravsehrawat commented 4 years ago

We had to cherry pick this code with modification to kue.prototype.watchStuckJobsMod