Xabaril / AspNetCore.Diagnostics.HealthChecks

Enterprise HealthChecks for ASP.NET Core Diagnostics Package
Apache License 2.0
3.98k stars 771 forks source link

Check for maximum queued jobs with Hangfire #2170

Closed karl-sjogren closed 2 months ago

karl-sjogren commented 4 months ago

What would you like to be added:

The Hangfire package could benefit from a check of how many enqueued jobs there are, with a configurable maximum that would fail the check.

Why is this needed:

A queue that grows larger then a specified value can indicate several problems, from too much being enqueued to a worker having stopped for some reason.

I have had this working internally for us for a while but wouldn't mind contributing a PR so others can use it.