-
Notifications
You must be signed in to change notification settings - Fork 47
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
kue-scheduler does not re-schedule unique job if worker dies uncleanly #82
Comments
appreciated |
same problem |
I think we are having a similar issue here. After we received a timeout error from redis, the unique scheduled job never triggered again. |
I am having same problem and planning to do this
Is there any logical error on above flow ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe this is due to a change I introduced:
If a unique job is 'active' and the worker that is processing the job becomes unavailable and never calls done(), and doesn't respond to the ttl timeout, the job will be stuck in 'active', and therefore never gets re-scheduled due to:
https://github.com/lykmapipo/kue-scheduler/blob/master/index.js#L56
I will submit a pull request to also check if the last_updated value is older than the job ttl and schedule the next job - this way they do not end up stale.
The only reservation I have about this method is that in a situation where the worker is just unable to talk to redis, it may complete the work twice.
The text was updated successfully, but these errors were encountered: