Event for empty queue #149

Closed
Jellyfrog opened this Issue Nov 16, 2012 · 1 comment

Projects

None yet

2 participants

@Jellyfrog
Contributor

A event for "all jobs complete" (queue empty) would be nice.

Currently im solving it like this, but that relies on the last job not failing :)

jobs.on('job complete', function(){
  jobs.inactiveCount(function(err, count) {
    if(count < 1) {
      // go
    }
  });
});

I know I could use the job specific events complete/failed but I want it on a "global level"

@behrad
Collaborator
behrad commented Jan 25, 2014

Undeterministic on a distributed environment.

@behrad behrad closed this Jan 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment