Release Notes
Hangfire.Core
- Added – Display deleted jobs in the Realtime and History graphs when supported by storage.
- Added –
DeletedStatenow have the persistedExceptionproperty. - Added –
JobContinuationOptions.OnlyOnDeletedStateto create continuations after a failure. - Added –
Exceptionjob parameter is passed to continuation whenUseResultsInContinuationsmethod is used. - Added –
FromExceptionAttributeto deal with an antecedent exception in a background job continuation. - Added – Allow to filter exception types in
AutomaticRetryAttributeby using the newOnlyOnproperty. - Added –
IBackgroundProcess.UseBackgroundPoolnow allows to pass thread configuration logic. - Added –
IGlobalConfiguration.UseJobDetailsRenderermethod for custom renderers. - Added –
BackgroundJobServerOptions.WorkerThreadConfigurationActionoption - Added – Allow to pass custom data to
ApplyStateContextandElectStateContextinstances. - Added – Preserve custom data dictionary between the entire filter chain.
- Added – Fetch "Retries" metric with other statistics when supported by storage
- Added –
IGlobalConfiguration.UseDashboardMetricsextension method to pass multiple metrics at once. - Added – State renderer for the
DeletedStateto display its new exception property. - Added – Virtual
JobStorage.GetReadOnlyConnectionmethod intended to returnJobStorageConnectionfor replicas. - Added – Virtual
JobStorage.HasFeaturemethod for querying optional features. - Added – Optional
GetSetCountandGetUtcDateTimemethods for theJobStorageConnectionclass. - Added – Optional
AcquireDistributedLockandRemoveFromQueuemethods for theJobStorageTransactionclass. - Added – Support for transactional acknowledge using new storage method for better handling some data loss scenarios.
- Added –
Factory,StateMachineandPerformerproperties to context classes to avoid injecting services. - Added – Allow to pass transaction to background job state changer when new methods implemented.
- Added – Optional
ParametersSnapshotproperty forBackgroundJobandJobDataclasses to minimize roundtrips in future. - Changed – Use the
AttemptsExceededAction.Deleteoption by default in the global automatic retry filter. - Changed – Move job to the
DeletedStateinstead ofSucceededStatewhen its invocation was canceled by a filter. - Changed –
FromParameterAttribute-based logic now always overwrites arguments, even with non-null values. - Changed – Improved display of real-time chart with more accents on failed and deleted jobs.
- Changed – Ignore some members when serializing a
JobFilterAttributeinstance to decrease size - Changed –
ServerHeartbeatProcessnow usesThreadPriority.AboveNormalto prioritize heartbeats.
Hangfire.SqlServer
- Added – Recommended Schema 8 migration with fixed
JobQueue.Idcolumn to usebiginttype. - Added –
SqlServerStorageOptions.PreferMicrosoftDataSqlClientoption to use the corresponding package. - Added –
SqlServerStorage.SchemaVersionmetric for Dashboard UI. - Added – Implement optional experimental transactional acknowledge for SQL Server (
UseTransactionalAcknowledgeoption). - Changed – Sliding invisibility timeout-based fetching method is now used by default with 5 minute timeout.
- Fixed – Ensure connection is released when exception is thrown when during lock release.
Hangfire.NetCore and Hangfire.AspNetCore
- Added –
IApplicationBuilder.UseHangfireServerthat accepts custom factory forIBackgroundProcessingServer.