Hi Support, I am started to use Hangfire library in few of my projects. I pretty much make use of queuing background job with msmq. However, there is a requirement in my project to cancel the current running background job. I read about using of cancellation token in the background method. When I add the IJobCancellationToken as param in method and calls cancellationToken.ThrowIfCancellationRequested() and click on the delete button in Hangfire dashboard to cancel processing job, apparently it does not cancel the job in my asp.net web api project. I can still see one message in my private queue and it still hits the breakpoints after deleting the job from the dashboard. Is there any step that I missing ? Thanks.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Cancel a running job | 11 | 44532 | December 12, 2023 | |
IJobCancellationToken and CancellationToken clarification | 2 | 3564 | December 24, 2018 | |
Deleting job doesn't cancel a token | 1 | 1713 | September 4, 2020 | |
CancellationToken is not being sent | 1 | 873 | March 26, 2020 | |
Using .Net Core CancellationToken instead of IJobCancellationToken | 3 | 1655 | September 13, 2017 |