Releases: HangfireIO/Hangfire
0.9
Release Notes
Please see the blog post for more details.
- Added – Out-of-the-box support for running recurring jobs (#115). It's incredibly simple!
- Added –
SqlServerStorage
now also accepts connection string names (#51). Thanks to @dlongest! - Changed –
IBackgroundJobClient
does not implement theIDisposable
interface anymore (#98). - Changed –
IMonitoringApi
does not implement theIDisposable
interface anymore (#110). Thanks to @sgwill! - Changed – Improve
DateTime
resolution for job arguments by including milliseconds (#109). Thanks to @dennyferra! - Changed – Removed deprecated
RetryAttribute
class. Please, useAutomaticRetryAttribute
(#97). - Fixed –
KeyNotFoundException
when accessing job cancellation token with Redis (#116). - Fixed – Theoretical race condition that makes HangFire Server invisible from Monitor (#112).
Upgrading
Version 0.9 brings some breaking changes. Please, do the following steps to perform the upgrade.
- Replace the
RetryAttribute
withAutomaticRetryAttribute
. - Remove the calls to
Dispose
method ofIBackgroundJobClient
interface (orBackgroundJobClient
class). - Remove the invocations of
IMonitoringApi.Dispose
method.
Links
0.8.3
Release Notes
Update urgency: HIGH, especially if you want to delete old failed jobs with absent target methods, or have long-running jobs and experience "thread aborted" message in logs.
- Added – Cancellation token for job methods that throws on server shutdown and job aborts (#103).
- Added – Place interrupted job back to its queue if possible (#50).
- Fixed – Can not delete jobs when method or class was removed (#101).
- Fixed – NullReferenceException in Monitor (#106).
- Fixed – SqlException when changing state of a job with absent target method (#107).
0.8.2
Release Notes
This release contains only new features that improve job management operations, upgrade is not required.
- Added - Batch operations on jobs for HangFire Monitor (#92).
- Added - Retry and delete buttons for almost every page of HangFire Monitor.
- Added - Duration and latency metrics for succeeded jobs (#95).
- Added - Display state transition latencies on job details page (#94).
- Added - DisableConcurrentExecution filter (#96).
- Misc - Tables in HangFire Monitor received some love (#93).
0.8.1
Release Notes
This release contains great new features, but upgrade is not required. Please, see the blog post for details.
- Added - MSMQ queues support for SQL Server job storage (#85).
- Added - "Deleted" state for jobs, when we don't want to process them anymore (#89).
- Added - "Requeue" and "Delete" buttons on a job page in HF Monitor (#55).
- Added - Logging job failures: warning - there is a retry, error - no attempts left (#87).
- Added -
BackgroundJob.Requeue
andBackgroundJob.Delete
methods. - Changed - Set
InvisibleTimeout
back from 5 to 30 minutes (#90). - Changed -
RetryAttribute
is deprecated. UseAutomaticRetryAttribute
instead.
0.8
Release Notes
Update urgency: HIGH. This release contains features related to security.
- Added – New server component subsystem - more reliability, more logging, less blocking on stop.
- Added – Added monitor access authorization using ASP.NET RoleProvider (#42).
- Removed – Deprecated job format based on classes is not supported anymore (#81).
- Changed – Monitor access restricted to local requests only by default (#42).
- Changed – Some breaking changes for public API. See the next section for details.
- Changed – Default automatic retry attempts count set to 10 (#71).
- Changed – Namespace optimization to reduce number of needed
using
statements. - Fixed – PreserveCultureAttribute does not work (#77).
- Fixed –
SqlServerStorageOptions.QueuePollInterval
is not working. - Fixed – Rare 'arithmetic overflow error for data type tinyint, value = -1' exception (#83).
- Fixed – Numerous minor issues catched with new unit tests.
Breaking Changes
- Changed constructor of
BackgroundJobServer
andAspNetBackgroundJobServer
classes. You should pass options through theBackgroundJobServerOptions
class. JobActivator.SetCurrent
method replaced withJobActivator.Current
property setter.RetryAttribute
,StatisticsHistoryAttribute
,PreserveCultureAttribute
(nowCaptureCultureAttribute
) moved fromHangFire.Filters
namespace to theHangFire
namespace.RedisStorageOptions.PollInterval
option moved toBackgroundJobServerOptions.SchedulePollingInterval
.BackgroundJob.ClientFactory
property made internal. Please, useIBackgroundJobClient
interface for unit tests, andBackgroundJobClient
class as default implementation.
Upgrading from 0.5
If you are still using HangFire 0.5, you can not upgrade to version 0.8 directly, because there is probability that you lose some of your jobs. This version drops support for jobs based on BackgroundJob
subclassing, so you need to do the following three-step process:
- Upgrade to version 0.7.5 first (see also release notes for 0.7).
- Add different implementation for your jobs using plain methods (see the guide) and wait until all old format jobs performed, don't forget to check scheduled jobs.
- Upgrade to version 0.8 or latest and remove old job classes.
0.7.5
0.7.4
Release Notes
Update urgency: HIGH. This release contains fix for serious problem.
- #60 – Removed
BackgroundJobServer.MachineName
validation. It caused exceptions with valid NetBIOS names. Thanks to @hahmed for reporting! - #61 – Opened
IBackgroundJobClient
andBackgroundJobClient
types. You can use them instead of staticBackgroundJob
class. - Ability to specify target queue in
BackgroundJob.Enqueue
method. - Fixed theoretical
IClientFilter
issue (CreateContext
ctor did not copy the JobId).
0.7.3
0.7.1
Release Notes
This release contains some minor fixes and link updates, upgrade is not required.
- Added HangFire.Autofac package.
- Added HangFire.Ninject package.
- Added some Sphinx-based docs.
- New project site and docs site.
- Some minor fixes.
0.7
Release Notes
Dear 0.7-alpha users! Please, DROP ALL HangFire tables before using this release!
- #43 – Changed NuGet package structure.
- #33 – Persistent storage abstraction.
- #34 – SQL Server job storage implementation.
- #41 – Using Common.Logging for logging and Json.NET for json encoding.
- #39 – Improved job fetching implementation.
- #47 – Increased default worker count.
- #35 – Removed obsolete
Perform
class. Please, see how to update your old jobs. - #44 – Fixed empty MVC 5 project Internal Server Error.
- #45 – Short exception stack traces, they contain only your code.
- #46 – Apply the Failed state when state filters/handlers cause an exception.
- Started work on restoration of the broken tests.
- Clarified some type names, state subsystem was greatly simplified.
Upgrading Guide
NuGet package structure has been changed. SQL Server job storage implementation now installed by default with the HangFire package. If you are using Redis as a storage and don't want to change anything, please, do the following steps:
Uninstall-Package HangFire
Uninstall-Package HangFire.Core
Install-Package HangFire.Redis
Install-Package HangFire.Web
- Update your HangFireConfig.cs file as described below.
- If your jobs are still based on the BackgroundJob class, upgrade them.
public static void Start()
{
// Place this line in the top of the Start method.
JobStorage.Current = new RedisStorage("localhost:6379", 0);
// ...
var server = /* ... */