bullmq: How to use moveToFailed and moveToCompleted
These 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.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 8
- Comments: 60 (26 by maintainers)
Commits related to this issue
- chore(release): 1.13.0 [skip ci]nn# [1.13.0](https://github.com/taskforcesh/bullmq/compare/v1.12.3...v1.13.0) (2020-12-30) ### Features * add support for manually processing jobs fixes [#327](https:... — committed to taskforcesh/bullmq by semantic-release-bot 6 years ago
- chore(release): 1.13.0 [skip ci] # [1.13.0](https://github.com/taskforcesh/bullmq/compare/v1.12.3...v1.13.0) (2020-12-30) ### Features * add support for manually processing jobs fixes [#327](https:... — committed to taskforcesh/bullmq by semantic-release-bot 6 years ago
- chore(release): 1.13.0 [skip ci] # [1.13.0](https://github.com/taskforcesh/bullmq/compare/v1.12.3...v1.13.0) (2021-01-06) ### Features * add support for manually processing jobs fixes [#327](https:... — committed to taskforcesh/bullmq by semantic-release-bot 6 years ago
- chore(release): 1.13.0 [skip ci] # [1.13.0](https://github.com/taskforcesh/bullmq/compare/v1.12.3...v1.13.0) (2021-01-06) ### Features * add support for manually processing jobs fixes [#327](https:... — committed to taskforcesh/bullmq by semantic-release-bot 6 years ago
- chore(release): 1.13.0 [skip ci] # [1.13.0](https://github.com/taskforcesh/bullmq/compare/v1.12.3...v1.13.0) (2021-01-06) ### Features * add support for manually processing jobs fixes [#327](https:... — committed to taskforcesh/bullmq by semantic-release-bot 6 years ago
- chore(release): 1.13.0 [skip ci] # [1.13.0](https://github.com/taskforcesh/bullmq/compare/v1.12.3...v1.13.0) (2021-01-06) ### Features * **job:** expose extendLock as a public method ([17e8431](htt... — committed to taskforcesh/bullmq by semantic-release-bot 6 years ago
@manast Of course, sorry about that…
Bump, I have a similar use case as @IoannMelnychuk where my job sends HTTP requests to an external service and I need to update the status of the job from this external server once it finishes the process. Steps:
job.waitUntilFinished()Job.fromId()and afterwards update the status of the job usingjob.moveToCompleted()orjob.moveToFailed()accordinglyResult:
Missing lock for job 13. finishedIs there a way of doing this without manually processing jobs? Thanks!
@manast how to own the lock for the job? Not with
getNextJobmethod, but with more accurate way (fromId, getJob, etc)?I need to find a job by ID and process this job manually
Thank you both!
One will have to manually process the queue to use
moveToFailed()?My approach was to use it like this (simplified) in process functions: