Skip to content

Is there a way to end a job that is taking too long like a timeout? #1378

Answered by manast
DashBarkHuss asked this question in Q&A
Discussion options

You must be logged in to vote

Since promises do not support cancellation it is not easy to implement a correct generic solution. You could implement your own TTL in the job by implementing your own cancel/cleanup mechanism and then reject the promise with some timeout specific code. Otherwise the solution we currently offer is in the Pro version using Observables (which not always is easy either since observables are not ubiquitous in node): https://docs.bullmq.io/bullmq-pro/observables/cancelation

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@DashBarkHuss
Comment options

@manast
Comment options

@DashBarkHuss
Comment options

Answer selected by DashBarkHuss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants