Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip feature #553

Closed
wants to merge 1 commit into from
Closed

Skip feature #553

wants to merge 1 commit into from

Conversation

andrewtamura
Copy link
Contributor

Would you be open to adding a skip feature like this? I can write all the tests

@behrad
Copy link
Collaborator

behrad commented Mar 28, 2015

I think this will complicate user's app job management, why not to fail and let that job retry later !?
or event create a new job based on current...
Can't see whats behind this @andrewtamura

@andrewtamura
Copy link
Contributor Author

I've read through the docs and code again and I think I see what you are saying.

If I have 100 jobs like this:

 queue.create('email', {
     title: 'welcome email for tj'
   , to: 'tj@learnboost.com'
   , template: 'welcome-email'
 }).attempts(5).backoff({type:'exponential'}).save();

and process them like this:

queue.process('email', 10, function(job, done){
    var err = new Error('Don't do the job, just fail it');
    done(err);
});

My 10 concurrent workers will take the first 10 jobs and fail them immediately. Then because the jobs have attempts and backoff set, they will not be failed but they will instead be delayed and my 10 workers will immediately process the next 10 jobs in the queue?

@behrad
Copy link
Collaborator

behrad commented Mar 30, 2015

Yes.
.attempts(5) makes them to be queued/delayed again (=retry), and since you have not set a delay they will be queued immediately :)

@behrad
Copy link
Collaborator

behrad commented Apr 20, 2015

not selected to be added to Kue for now.

@behrad behrad closed this Apr 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants