Functionality to read Hangfire configurations from key-value pair based configuration.
Switch branches/tags
Nothing to show
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.
src/Hangfire.Extensions.Configuration
.gitattributes
.gitignore
Hangfire.Extensions.Configuration.sln
LICENSE
README.md

README.md

Hangfire.Extensions.Configuration

Functionality to read Hangfire configurations from key-value pair based configuration.

Install

PM> Install-Package Hangfire.Extensions.Configuration -Version 1.0.0

Functionality

  • GetHangfireDashboardOptions: Gets the Hangfire dashboard options.
  • GetHangfireBackgroundJobServerOptions: Gets the Hangfire background job server options.

Usage

  1. Add this NuGet package to your project.
  2. In your appsettings.json add the following section:
    "Hangfire": {
    	"Dashboard": {
    		"AppPath": "/",
    		"StatsPollingInterval": 2000
    	},
    	"Server": {
    		"HeartbeatInterval": "00:00:30",
    		"Queues": [ "default" ],
    		"SchedulePollingInterval": "00:00:15",
    		"ServerCheckInterval": "00:05:00",
    		"ServerName": null,
    		"ServerTimeout": "00:05:00",
    		"ShutdownTimeout": "00:00:15",
    		"WorkerCount": 20
    	}
    }
  3. In your startup.cs add the following using statement:
    using Hangfire.Extensions.Configuration;
  4. In your startup.cs add the following lines in the configure method:
    app.UseHangfireDashboard("/hangfire", Configuration.GetHangfireDashboardOptions());
    app.UseHangfireServer(Configuration.GetHangfireBackgroundJobServerOptions());

Change Log

Version 1.0.0

New Features

References