Azure DocumentDB storage provider for Hangfire
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Hangfire.AzureDocumentDB
.gitignore
Hangfire.AzureDocumentDB.sln
LICENSE
README.md

README.md

Hangfire.AzureDocumentDB

Official Site Latest version Build status

This repo will add a Microsoft Azure DocumentDB storage support to Hangfire - fire-and-forget, delayed and recurring tasks runner for .NET. Scalable and reliable background job runner. Supports multiple servers, CPU and I/O intensive, long-running and short-running jobs.

Installation

Hangfire.AzureDocumentDB is available as a NuGet package. Install it using the NuGet Package Console window:

PM> Install-Package Hangfire.AzureDocumentDB

Usage

Use one the following ways to initialize DocumentDbStorage

GlobalConfiguration.Configuration.UseAzureDocumentDbStorage("<url>", "<authSecret>", "<databaseName>", "<collectionName>");

Hangfire.Azure.DocumentDbStorage storage = new Hangfire.Azure.DocumentDbStorage("<url>", "<authSecret>", "<databaseName>", "<collectionName>");
GlobalConfiguration.Configuration.UseStorage(storage);
// customize any options
Hangfire.Azure.DocumentDbStorageOptions options = new Hangfire.Azure.DocumentDbStorageOptions
{
    RequestTimeout = TimeSpan.FromSeconds(30),
    ExpirationCheckInterval = TimeSpan.FromMinutes(15),
    CountersAggregateInterval = TimeSpan.FromMinutes(1),
    QueuePollInterval = TimeSpan.FromSeconds(2)
};

GlobalConfiguration.Configuration.UseAzureDocumentDbStorage("<url>", "<authSecret>", "<databaseName>", "<collectionName>", options);

// or 

Hangfire.Azure.DocumentDbStorage storage = new Hangfire.Azure.DocumentDbStorage("<url>", "<authSecret>", "<databaseName>", "<collectionName>", options);
GlobalConfiguration.Configuration.UseStorage(storage);

Questions? Problems?

Open-source project are developing more smoothly, when all discussions are held in public.

If you have any questions or problems related to Hangfire.AzureDocumentDB itself or this storage implementation or want to discuss new features, please create under issues and assign the correct label for discussion.

If you've discovered a bug, please report it to the GitHub Issues. Detailed reports with stack traces, actual and expected behavours are welcome.