I need to cleanup PendingJobs on server start during a release of new code, so I’m running code taken from this thread: Is there a way to cancel all pending jobs in a named queue? · Issue #394 · HangfireIO/Hangfire · GitHub
I’m taking records returned by monitoringApi.EnqueuedJobs
, getting a JobId
from .Key
, and then BackgroundJob.Delete()
-ing it.
All good.
It would be really nice, though, to know What is getting deleted .
The JobId doesn’t mean much in the logs, so I’d love to be able to tie that JobId back to a RecurringTask Id/Key.
Is that possible?