diff --git a/README.md b/README.md index 42eb00f..702f5fa 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Hangfire.AzureDocumentDB [![Official Site](https://img.shields.io/badge/site-hangfire.io-blue.svg)](http://hangfire.io) -[![Latest version](https://img.shields.io/badge/nuget-v1.0.0-blue.svg)](https://www.nuget.org/packages/Hangfire.AzureDocumentDB) -[![Build status](https://ci.appveyor.com/api/projects/status/8bail001djs64inu?svg=true)](https://ci.appveyor.com/project/imranmomin/hangfire-azuredocumentdb) +[![Latest version](https://img.shields.io/nuget/vpre/Hangfire.AzureDocumentDB.svg)](https://www.nuget.org/packages/Hangfire.AzureDocumentDB) +[![Build status](https://ci.appveyor.com/api/projects/status/uvxh94dhxcokga47?svg=true)](https://ci.appveyor.com/project/imranmomin/hangfire-azuredocumentdb) This repo will add a [Microsoft Azure DocumentDB](https://azure.microsoft.com/en-ca/services/documentdb) storage support to [Hangfire](http://hangfire.io) - 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. @@ -21,24 +21,29 @@ Usage ------------- -Use one the following ways to initialize `AzureDocumentDBStorage` +Use one the following ways to initialize `AzureDocumentDbStorage` ```csharp -GlobalConfiguration.Configuration.UseAzureDocumentDBStorage("", ""); +GlobalConfiguration.Configuration.UseAzureDocumentDbStorage("", "", ""); -AzureDocumentDB.AzureDocumentDBStorage azureDocumentDBStorage = new AzureDocumentDB.AzureDocumentDBStorage("", "", ""); +Hangfire.AzureDocumentDB.AzureDocumentDbStorage azureDocumentDBStorage = new Hangfire.AzureDocumentDB.AzureDocumentDbStorage("", "", ""); GlobalConfiguration.Configuration.UseStorage(azureDocumentDBStorage); +``` +```csharp // customize any options -AzureDocumentDB.AzureDocumentDBStorageOptions azureDocumentDBStorageOptions = new AzureDocumentDB.AzureDocumentDBStorageOptions +Hangfire.AzureDocumentDB.AzureDocumentDbStorageOptions azureDocumentDBStorageOptions = new Hangfire.AzureDocumentDB.AzureDocumentDbStorageOptions { Queues = new[] { "default", "critical" }, - RequestTimeout = System.TimeSpan.FromSeconds(30), - ExpirationCheckInterval = TimeSpan.FromMinutes(15); - CountersAggregateInterval = TimeSpan.FromMinutes(1); - QueuePollInterval = TimeSpan.FromSeconds(2); + RequestTimeout = TimeSpan.FromSeconds(30), + ExpirationCheckInterval = TimeSpan.FromMinutes(15), + CountersAggregateInterval = TimeSpan.FromMinutes(1), + QueuePollInterval = TimeSpan.FromSeconds(2) }; -AzureDocumentDB.AzureDocumentDBStorage azureDocumentDBStorage = new AzureDocumentDB.AzureDocumentDBStorage("", "", "", azureDocumentDBStorageOptions); + +GlobalConfiguration.Configuration.UseAzureDocumentDbStorage("", "", "", azureDocumentDBStorageOptions); + +Hangfire.AzureDocumentDB.AzureDocumentDbStorage azureDocumentDBStorage = new Hangfire.AzureDocumentDB.AzureDocumentDbStorage("", "", "", azureDocumentDBStorageOptions); GlobalConfiguration.Configuration.UseStorage(azureDocumentDBStorage); ```