Skip to content

cofoundry-cms/Cofoundry.Plugins.BackgroundTasks.Hangfire

Repository files navigation

Cofoundry.Plugins.BackgroundTasks.Hangfire

Build status NuGet

This library is a plugin for Cofoundry. For more information on getting started with Cofoundry check out the Cofoundry repository.

Overview

HangFire is an easy way to perform background processing in .NET and .NET Core applications. No Windows Service or separate process required. Backed by persistent storage. Open and free for commercial use.

hangfire.io

This Hangfire imlpementation of Cofoundry.Core.BackgroundTasks includes:

  • A HangFire implementation of IBackgroundTaskScheduler
  • Automatically initializes HangFire using a Startup Task
  • Sets up HangFire to use SqlServer storage using the Cofoundry connection string.
  • Optionally sets up to the HangFire dashboard for admin users at /admin/hangfire

Cofoundry does not include a background task runner by default so it is recommended that you use this library if you need to run background tasks.

Settings

  • Cofoundry:Plugins:Hangfire:Disabled Prevents the HangFire server being configuted and started. Defaults to false.
  • Cofoundry:Plugins:Hangfire:EnableHangfireDashboard Enables the HangFire dashboard for Cofoundry admin users at /admin/hangfire. Defaults to false.

Customizing the HangFire Initialization Process

We use an automatic boostrapper to make HangFire integration simple for most scenarios, but if you want to customize the process you can override the default IHangfireServerInitializer implementation using the Cofoundry DI system.

This might be required if you want to configure a faster storage engine like reddis for scaling up your deployment.

About

Hangfire implementation of Cofoundry.Core.BackgroundTasks.

Resources

License

Stars

Watchers

Forks

Packages

No packages published