RomainLanz / adonis-bull-queue

Queue system based on BullMQ for AdonisJS
MIT License
147 stars 26 forks source link

Handle a job #45

Closed rutonyru closed 5 months ago

rutonyru commented 5 months ago

Hi @RomainLanz, I need some more explanations... If you have time to answer, it will be great :) Now, I'm ready to 'Handle' my job. It is quite easy for most of the case. But, what and how should I do to manage error and to be precise, How to get the reference of the BullMQ job to "moveToFailed" ? Is it a stupid question ? Thanks, Rutonyru.

RomainLanz commented 5 months ago

Hey @rutonyru! 👋🏻

I am not sure I get your question.

If your job fails for some reason, it will be retried depending on the configuration you provided. If it still fails, the rescue method will be called, and you can do whatever you want here.

rutonyru commented 5 months ago

@RomainLanz , Yes, I know I need to improve my knowledge about the way it works. I add some informations in the #46 but I figure out how to manage without having the job reference. I still don't know how to "kill" the job when my entity is deleted and don't need any more an async treatment.

Let's close this discussion :)