Hangfire.Storage.SQLite
Overview
An Alternative SQLite Storage for Hangfire.
This project was created by abandonment Hangfire.SQLite storage (https://github.com/wanlitao/HangfireExtension), as an alternative to use SQLite with Hangfire.
Is production ready? Yes
Installation
Install a package from Nuget.
Install-Package Hangfire.Storage.SQLite
Usage
This is how you connect to an SQLite instance
GlobalConfiguration.Configuration.UseSQLiteStorage();
Example
services.AddHangfire(configuration => configuration
.UseSimpleAssemblyNameTypeSerializer()
.UseRecommendedSerializerSettings()
.UseSQLiteStorage());
Options
In the UseSQLiteStorage method you can use an instance of the Hangfire.Storage.SQLite.SQLiteStorageOptions class to specify some options of this plugin.
Below is a description of them:
Option |
Default Value |
---|---|
QueuePollInterval | TimeSpan.FromSeconds(15) |
InvisibilityTimeout | TimeSpan.FromMinutes(30) |
DistributedLockLifetime | TimeSpan.FromSeconds(30) |
JobExpirationCheckInterval | TimeSpan.FromHours(1) |
CountersAggregateInterval | TimeSpan.FromMinutes(5) |
AutoVacuumSelected | AutoVacuum.NONE, other options: AutoVacuum.Full or AutoVacuum.Incremental AutoVacumm Explained |
Thanks
This project is mainly based on Hangfire.LiteDB storage by @codeyu (https://github.com/codeyu/Hangfire.LiteDB)
Donation
If this project help you reduce time to develop, you can give me a cup of coffee :)
License
This project is under MIT license. You can obtain the license copy here.