C
C#4mo ago
Julian

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
Tvde1
Tvde14mo ago
Just curious, what do you want to achieve with this?
Julian
Julian4mo ago
Seq logging and i have a running SingalR Connection where i want to publish to all my clients the updated states
jcotton42
jcotton424mo ago
Does Hangfire's own built-in logging not cover the first part?
Julian
Julian4mo ago
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 ?
Want results from more Discord servers?
Add your server