Automattic / kue

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

"kue-wide refactoring to change all static and globals" decoupling singleton #1187

Open devthejo opened 6 years ago

devthejo commented 6 years ago

Hello, I just discovered this awesome library this week and I would like to bring my contribution to make it further more reliable. I've tried to keep the coding style as I found it, but it was hard because I'm accustomed to Babel, E6, and StandardJS (so it's possible that some ; are missing, cause I don't use them myself anymore ). I've introduced a new method called getQueue, that is using the singleton, and now createQueue is creating new instances (with all it's own scope, obviously). I'm on Node 9.3 and all the unit tests are working, I had to modify them a little bit but a minium.

devthejo commented 6 years ago

you can also take a look on my current dev improvements on the dev branch