-
Notifications
You must be signed in to change notification settings - Fork 866
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
Inconsistencies in job's state #1204
Comments
Finally I know what's the problem. So it's the This So from time to time, a job finishes but later the progress (thus refreshTtl) runs and it adds the job back to active zset. |
Unfortunately |
kue version: 0.11.6
I'm experiencing a weird phenomena with some of our jobs. I have jobs in
{q}:jobs:active
ZSET that have theirstate
set tofailed
.I've tried to figure out how this is possible but I couldn't. My first suspect was that there was some external restart of the process during the
job.state()
function but theMUTLI
is used there so it shouldn't cause any inconsistencies.There is this queue.checkActiveJobTtl() mechanism that runs every second and in our case on some events we have a lot of these inconsistent jobs and these get processed every second which is causing an unnecessary load on our servers.
The simplest solution would be to add:
here: https://github.com/Automattic/kue/blob/master/lib/kue.js#L245 however on one server I've noticed that we have inconsistency with jobs in the "incative" box (these are in inactive ZSET but their state is set to "failed")
The text was updated successfully, but these errors were encountered: