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

Lock client prevents kue to exit the process after shutdown #578

Closed
jesucarr opened this issue Apr 15, 2015 · 9 comments
Closed

Lock client prevents kue to exit the process after shutdown #578

jesucarr opened this issue Apr 15, 2015 · 9 comments
Labels

Comments

@jesucarr
Copy link

See issue #574, and comment #574 (comment) for full explanation.

@behrad
Copy link
Collaborator

behrad commented Apr 24, 2015

@jesucarr would you test if promotion timer issues fixed in latest commit?

@jesucarr
Copy link
Author

No, the process is still stuck after "queue closed" is done

@behrad
Copy link
Collaborator

behrad commented Apr 25, 2015

Would you please post the code snippet of your shutdown so that I can run & debug it.

@behrad
Copy link
Collaborator

behrad commented Apr 25, 2015

you are using 0.9.0 (master) and search indexes are at their default (off), right?

@jesucarr
Copy link
Author

kue = require('../lib/kue');

queue = kue.createQueue({
  disableSearch: true
});

job = queue.create('test job', {
  num: 1
}).attempts(2).delay(1000 * 10).backoff({
  type: 'exponential'
}).save(function(err) {
  if (err) {
    return console.log(err);
  }
  console.log('job added', job.id);
  return queue.shutdown(function(err) {
    return console.log('queue closed');
  });
});

@behrad
Copy link
Collaborator

behrad commented Apr 25, 2015

this is because of the extra lock client which warlock uses, and kue cannot end it at shutdown, I saw a bug when you change warlock modules redis client object: TheDeveloper/warlock#11
I should re-implement a distributed lock inspired by warlock, since no response to that issue is seen...

And some points about your code:

  1. in kue 0.9.0 search is off by default, no need to set disableSearch any more
  2. if you are not creating workers (calling .process) there's no need to call shutdown

@behrad
Copy link
Collaborator

behrad commented Apr 25, 2015

So this is not related to promotion timer and will be renamed if you don't mind :)

@behrad behrad changed the title Fix issue related to promotion timer Lock client prevents kue to exit the process after shutdown Apr 25, 2015
@behrad
Copy link
Collaborator

behrad commented May 2, 2015

fixed by forking warlock

@behrad behrad closed this as completed May 2, 2015
@behrad behrad removed the in progress label May 2, 2015
@behrad
Copy link
Collaborator

behrad commented May 2, 2015

73a8bb7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants