Hook into job state change in HangFire
Hey,
I'm currently trying to find a way to execute code that requires the JobId and the new job state every time the status of a Hangfire job changes.
With general filters it is not possible to get this data, because many values are null during this process.
Apparently there used to be something like an
IBackgroundJobStateChanger
but it doesn't work anymore since a few versions (Or I just don't know how...)
Does anyone have another idea to solve the problem?4 Replies
Just curious, what do you want to achieve with this?
Seq logging and i have a running SingalR Connection where i want to publish to all my clients the updated states
Does Hangfire's own built-in logging not cover the first part?
Probably yes, but not the SignalR Part and the PO wanted to combine it...
The logging has lower priority than the Notification to other SignalR Clients...
any ideeas ?