Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/karl-sjogren/hangfire-health-checks
https://github.com/karl-sjogren/hangfire-health-checks
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/karl-sjogren/hangfire-health-checks
- Owner: karl-sjogren
- License: mit
- Created: 2024-05-02T06:52:44.000Z (7 months ago)
- Default Branch: develop
- Last Pushed: 2024-05-02T11:46:27.000Z (7 months ago)
- Last Synced: 2024-05-02T20:29:11.964Z (7 months ago)
- Language: C#
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Karls Hangfire Health Checks [![NuGet Badge](https://buildstats.info/nuget/Karls.Hangfire.HealthChecks)](https://www.nuget.org/packages/Karls.Hangfire.HealthChecks/)
This is a ASP.NET Core health check for use with [Hangfire](https://www.hangfire.io/).
It supports a few more health checks then the one found in the
[AspNetCore.Diagnostics.HealthChecks](https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks)
package.## Installation
### .Net CLI
```sh
> dotnet add package Karls.Hangfire.HealthChecks
```## Usage
This assumes that you have already setup Hangfire in your application and that you have
an endpoint for health checks.```csharp
public void ConfigureServices(IServiceCollection services) {
services.AddHealthChecks(builder =>
builder
.AddHangfireCheck("Hangfire", optionsBuilder =>
optionsBuilder
.MinimumAvailableServers(1)
.MaximumJobsFailed(1)
.AddJobQueueCheck("SpecialQueue", maximumQueuedJobs: 10),
HealthStatus.Degraded);
);
}
```