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

Remove .process listeners #1185

Open throoze opened 6 years ago

throoze commented 6 years ago

This is more like a question than an issue, but i'd like to know what happens with the listeners (.process in particular) when no more messages get in the queue for a given message type. For example, lets say I set a listener like:

var kue = require('kue')
 , queue = kue.createQueue();

queue.process('foo', function(job, done){
  // Do something with the job
});

Is there a way to tell kue to stop (not temporarily pause) processing a given message type, so any memory allocated to that would be freed?

Something like:

var kue = require('kue')
 , queue = kue.createQueue();

queue.stopProcessing('foo');

Thanks a lot!

samuelgoldenbaum commented 5 years ago

*bump