This is a patch release that slightly improves the shutdown pipeline of a background job server and allows to get the current server id from IServerFilter
implementations.
Hangfire.Core
-
Added – Pass server id from a worker to the
PerformContext.ServerId
property available in filters. - Fixed – Send heartbeats until full background processing server shutdown.
Hangfire.NetCore
- Changed – Send the stop signal earlier in the shutdown pipeline when hosting in .NET Core 3.1 or higher.
-
Changed – Set processing server to null in hosted service to avoid
ObjectDisposedException
. -
Fixed – Other
IHostedService
implementations can block Hangfire server from being stopped.