odinserj/HangFire — pull request #89 by odinserj (2014-05-16 10:56:59+00:00)
Title: Deleting jobs

This PR adds a feature to delete jobs. There is a new state – `DeletedState`, and some methods to perform the deletion – `BackgroundJob.Delete` and `IBackgroundJobClient.Delete`. When you are using these methods, a job is not being actually deleted, there is only state transition. Jobs in the deleted state expire after some delay (as succeeded jobs).

The operation does not provides guarantee that the job will not be performed. If you deleting a job that is performing right now, it will be performed anyway, despite of calls to delete methods.

**Usage**

```csharp
var jobId = BackgroundJob.Enqueue(() => Console.WriteLine("Hello, world!"));
BackgroundJob.Delete(jobId);

// or
IBackgroundJobClient client = new BackgroundJobClient();
client.Delete(jobId);
```

**Work is in progress**

* [ ] Add buttons to HangFire.Monitor to delete jobs manually.
* [ ] Implement `DeletedState` support for Redis job storage (add a state handler).