question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: exception when job processing returns immediately

See original GitHub issue

For some type of jobs I’d like to skip them if they’ve been added to the queue more then a minute ago. Just return from the job processing function, but if I do so, it throws an exception while in the waitUntilFinished() function. If I wait 200ms, there is no exception.

Error: Missing key for job bull:s-10-qd:6d7f769f-37cf-40a4-88ba-bf7aeb6ed971. isFinished
        at onFailed (C:\Develop\mastercompare\node_modules\bullmq\dist\classes\job.js:474:24)        
        at C:\Develop\mastercompare\node_modules\bullmq\dist\classes\job.js:496:21
        at processTicksAndRejections (node:internal/process/task_queues:96:5)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
manastcommented, Oct 14, 2021

@andrisi can you please provide a code example that reproduces the error?

0reactions
manastcommented, Aug 27, 2022

I will close this issue now, also I encourage you to avoid using job.waitUntilFinished at all costs, here a post I wrote a while ago: https://blog.taskforce.sh/do-not-wait-for-your-jobs-to-complete/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug: exception when job processing returns immediately #801
I push jobs into a queue based on users' requests that need to be served quickly. If the workers fail and are restarted,...
Read more >
How to capture the exception raised in the scriptblock of start ...
Using throw will change the job object's State property to "Failed". The key is to use the job object returned from Start-Job or...
Read more >
Dealing with Exceptions - Hangfire Documentation
When Hangfire encounters external exception that occurred during the job performance, it will automatically try to change its state to the Failed one,...
Read more >
Exceptions & Retries - Python RQ
Jobs can fail due to exceptions occurring. When your RQ workers run in the background, how do you get notified of these exceptions?...
Read more >
Best Practice: Catching and re-throwing Java Exceptions - IBM
Answer. It is a well-known best practice that a Java application should not suppress caught exceptions with blank catch blocks; however, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found