Bull: MoveToCompleted are not excluding job from 'delayed' list

Created on 27 Sep 2017  路  7Comments  路  Source: OptimalBits/bull

Hello, I used method job.moveToCompleted("sometext", true) to force finish the job. But if I use the Arena tool to see all jobs - the job remaining in the "Delayed" state, although if open it separately, it shows "Completed" state as well. I understand that you are not responsible for Arena, but maybe you are against using this method "as is", without emitting some events or something else.
So please clarify, could I use this method and be sure that job will be not repeated again?

enhancement

Most helpful comment

@manast Do you have a solution for this?
What do we have to use in order to cancel a job?
Help :(

All 7 comments

Maybe we have to implement ability to remove job from "Delayed" list as well?

moveToComplete is a private method so it should not be used. We would need to have a separate method for forcing a job to be cancelled, in order to do this properly we need to signal the processor that the job has been cancelled so that it does not continue processing.

@manast Okay, but moveToComplete it listed not in "private" section.
Regarding part when you suggested to signal the processor that job has been cancelled, will you expose public method for it or it has to be done through adding to job.data some flag for processor?

not sure yet how it will come out I need to think more about it.

@manast okay, good. Thank you for answers!

@manast Do you have a solution for this?
What do we have to use in order to cancel a job?
Help :(

I need to mark job as completed and "release" worker later during execution. Because of existing architecture there's no way i can pass original done() callback from processor to the final stage of actual processing. moveToCompleted does the queue part, but it does not release worker. Is there any way to do it? Or im stuck with Bull..

Was this page helpful?
0 / 5 - 0 ratings