You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varjob=queue.createJob({name: "test"}).save();job.on('succeeded',function(result){console.log('Received result for job '+job.id+': result : '+JSON.stringify(result));})queue.on('error',function(err){console.log("queue all error show -- ",err);});queue.process(function(job,done){//do ... ingreturndone(null,job.data);});
Oh, hmm. I know restarting Redis clears the script cache, which we depend on having populated on bee-queue startup. I suppose if we just clear it on a restart then bee-queue will repopulate the cache.
I'm seeing the same problem on localhost redis 3.0.3. I am working on migrating some code from kue to bee-queue, and when I start the app up, I hit this exact exception. I get that the EVALSHA command will fail with this error if the script's shasum doesn't already exist in redis' cache, but then the client is supposed to turn around and do EVAL with the script source, right? So, why am I hitting this on a first time execution where I've never used bee-queue before? The scripts obviously would not be cached, so I would expect it to recover from this and push them to the server, right?
I'm not sure I follow the recommended fix above -- can someone clarify?
Ah, ok, I see @mllongze provided his own forked fix here -- any chance you can submit that PR here, or @LewisJEllis can you provide a fix and repub to npm?
Yes, I can do that fix and publish a new version to npm tonight. I originally wanted to give @mllongze time to send a PR since he originally found the fix, but it's been long enough.
Activity
mllongze commentedon Nov 25, 2015
Hi @LewisJEllis
I think i find the question!
because client.evalsha is rebuild cache when redis server restart.
so i fixed it. add [flushCache, buildCache] on client "ready"。
the flushCache only like this
I don't know this change will not have a problem!
LewisJEllis commentedon Nov 25, 2015
Oh, hmm. I know restarting Redis clears the script cache, which we depend on having populated on bee-queue startup. I suppose if we just clear it on a restart then bee-queue will repopulate the cache.
LewisJEllis commentedon Nov 25, 2015
Oh, yep, roughly that is exactly the fix I was just describing. If you want to send a PR, I'll verify it and publish a new version to npm.
mllongze commentedon Nov 25, 2015
@LewisJEllis
Thank you for your answer.
I looking forward for you add cluster.
I will always focus on the project. 😃
davisford commentedon Dec 8, 2015
I'm seeing the same problem on localhost redis 3.0.3. I am working on migrating some code from kue to bee-queue, and when I start the app up, I hit this exact exception. I get that the
EVALSHAcommand will fail with this error if the script's shasum doesn't already exist in redis' cache, but then the client is supposed to turn around and doEVALwith the script source, right? So, why am I hitting this on a first time execution where I've never used bee-queue before? The scripts obviously would not be cached, so I would expect it to recover from this and push them to the server, right?I'm not sure I follow the recommended fix above -- can someone clarify?
Ah, ok, I see @mllongze provided his own forked fix here -- any chance you can submit that PR here, or @LewisJEllis can you provide a fix and repub to npm?
LewisJEllis commentedon Dec 8, 2015
Yes, I can do that fix and publish a new version to npm tonight. I originally wanted to give @mllongze time to send a PR since he originally found the fix, but it's been long enough.