Skip to content

pmanny/Hangfire.Mongo

 
 

Repository files navigation

Hangfire.Mongo

Build status

MongoDB support for Hangfire library. By using this library you can store all jobs information in MongoDB.

Note: This is pre-alpha version, that has not been ever tested. Please, use it with care :)

Installation

To install Hangfire MongoDB Storage, run the following command in the Nuget Package Manager Console:

PM> Install-Package HangFire.Mongo

Usage

app.UseHangfire(config =>
{
	config.UseMongoStorage("<connection string>", "<database name>");
});

For example:

app.UseHangfire(config =>
{
	config.UseMongoStorage("mongodb://localhost", "ApplicationDatabase");
});

Custom collections prefix

To use custom prefix for collections names specify it on Hangfire setup:

app.UseHangfire(config =>
{
	config.UseMongoStorage("mongodb://localhost", "ApplicationDatabase",
  	  	new MongoStorageOptions { Prefix = "custom" } );
});

License

Hangfire.Mongo is released under the MIT License.

About

Mongo DB support for Hangfire

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%