As described in https://github.com/HangfireIO/Hangfire/issues/67 I have implemented action filter to get notified when jobs state changes etc.
The problem is that when IServerFilter.OnPerformed(PerformedContext filterContext) is triggered, I need to know if that was the last job by calling JobStorage.Current.GetMonitoringApi().ProcessingJobs(0, int.MaxValue). The job which was just ended is still returned by ProcessingJobs. Furthermore the ProcessingJobDto.InProcessingState is true.
I think this is a bug.