-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Delayed job "Will run at" wrong source value #544
Comments
Hi @chriscarpenter12 thank you for reporting this issue, I'm not using |
Related issue in bullmq: taskforcesh/bullmq#1728 There isn't a good way to solve this:
Internally, the "will run at" time can be obtained from the job's score in the delayed zset in redis, but there isn't a public API to get that |
Released in |
usage of |
@felixmosh You'll still get wrong values, just in differently now: If a startTS = Date.now();
job = await queue.add(..., { delay: 16 * 60 * 1000 );
// ...after 15 minutes
await job.changeDelay(60 * 1000);
job = await queue.getJob(job.id);
job.timestamp + job.delay == startTs + 60 * 1000; // this is wrong, it should be startTS + 16 minutes |
@hyperair you are right, but seems that it should be solved on the BullMQ side, not on this board. |
see my comment in the bullmq issue |
Since I really need this feature I patched the api to get the correct delayed value. Feels like the issue at bullmq is inactive. Here is the patch I use if anyone needs it
|
When a delayed job is added it displays a "Will run at" in the UI, but if the job uses changeDelay that value is never reflected in the UI leading to confusion as the job properties look correct.
I'm not completely sure, but I think here is where it's reading from
job.opts
, but instead should just use thedelay
property on the job itself.Comparing two job properties that have/have not been updated.
Unchanged:
Job called with
changeDelay
The text was updated successfully, but these errors were encountered: