Unable to Cancel Currently Picked Task #494
Replies: 2 comments 3 replies
-
Yeah, cancellation is currently not supported, hence the error-message. It is a bit tricky to implement. If you have some sort of loop in your |
Beta Was this translation helpful? Give feedback.
-
Hello, Mixing cancellation logic with the business logic of the task feels wrong, and will probably lead to unwanted duplication as every task needs to have its own check of premature termination condition. Also sometimes even though there is a loop, each iteration takes a couple of minutes, creating a large gap between issuing a cancel command and the task actually being cancelled. However, taking into account Java threading model limitations, is there any chance of this feature being supported on library level at all? Could you expand on what parts of implementation are tricky? Thanks |
Beta Was this translation helpful? Give feedback.
-
Hello,
We are experiencing issues with db-scheduler where it seems impossible to cancel a task that is currently being executed ("currently picked"). This is causing problems in our application as it occurs frequently.
Error messages encountered:
Has anyone encountered a similar issue or have any suggestions for a solution? We are specifically looking for a way to cancel tasks even if they are currently being executed. We are interested in implementing a "mark as cancelled" functionality, where tasks can be flagged as cancelled without attempting to modify them directly during execution. If direct cancellation is not possible, are there recommended strategies to handle this scenario effectively?
Thank you for your help.
Beta Was this translation helpful? Give feedback.
All reactions