kue icon indicating copy to clipboard operation
kue copied to clipboard

Remove .process listeners

Open throoze opened this issue 6 years ago • 1 comments

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!

throoze avatar Jun 01 '18 14:06 throoze

*bump

samuelgoldenbaum avatar Feb 22 '19 20:02 samuelgoldenbaum