How to use moveToFailed and moveToCompleted
See original GitHub issueThese two functions are different from v3 and I just don’t know what to set for the token.
job.moveToFailed(new Error('failed message'), ???);
IssueHunt Summary
manast has been rewarded.
Backers (Total: $40.00)
- grapevineai ($40.00)
Submitted pull Requests
Tips
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on IssueHunt to raise funds.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:60 (25 by maintainers)
Top Results From Across the Web
How to use moveToFailed and moveToCompleted - Issuehunt
One will have to manually process the queue to use moveToFailed() ? My approach was to use it like this (simplified) in process...
Read more >Manually processing jobs - BullMQ
When a Worker is instantiated, the most common usage is to specify a process ... moveToCompleted/moveToFailed" is not used, signalling that the next...
Read more >moveToCompleted - Bohemia Interactive Community Wiki
Syntax: moveToCompleted person; Parameters: person: Object ... _isCompleted = moveToCompleted _unit; ... See also: moveTo moveToFailed ...
Read more >Use Bull to Manage Job Queues in a ... - Better Programming
These allow you to manage jobs using a key-value store such as Redis. ... moveToFailed() , and job.moveToCompleted() are all we need.
Read more >Asynchronous task processing in Node.js with Bull
Before we begin using Bull, we need to have Redis installed. ... a log row to this job-specific job, moveToCompleted , moveToFailed ,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@manast Of course, sorry about that…
Thanks for the reply @manast ! That’s definitely the way I’d go for it if I was doing this from scratch, however, we are currently migrating from a previous scheduler system which used HTTP calls to our main core-api service (which also depend on different modules and internal controllers that are already set-up and working).
I tried fiddling around with manually processing jobs and sending the token through the HTTP request itself. I was able to correctly manage the status of the job but, as I expected, there is no way to signal the
queueEvents
interface that the process is completed from an external service.For now we are going to keep these external jobs out of the migration, but it would be great if there was a way to manage these kind of implementations (given the amount of people with similar use cases as well) and I’d be willing to help in anything needed for this.