HangfireIO / HangfireIO/Hangfire

IBackgroundProcess defined on StartUp not shown in the Dashboard

Open
#440 5 comments 5 reactions 0 assignees View on GitHub
a: dashboard t: feature-request
Dominant language
C#
Stars
10.1k
Forks
1.8k
Avg merge
1h 19m
Merged PRs (30d)
1

Description

I define a process-class implementing the IBackgroundProcess-interface like following

``` c#
using Hangfire.Server;

namespace Some.Namespace {
public class MyBackgroundProcess : IBackgroundProcess {
public void Execute(BackgroundProcessContext context) {
DoSomeWork();
context.CancellationToken.WaitHandle.WaitOne(TimeSpan.FromMinutes(5));
}
}
}
```

and add the process on startup

``` c#
using Microsoft.Owin;
using Owin;
using Hangfire;
using Hangfire.SqlServer;
using Hangfire.Dashboard;

[assembly: OwinStartup(typeof(Eicin.Erp.Ui.Web.Startup))]
namespace Eicin.Erp.Ui.Web
{
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
// ...
// Do the other init

app.UseHangfireServer(new MyProcess());

// Do additional stuff
}
}
}
```

the process is not visibile on the dashboard. Is there a possibilty to make it visible?

Contributor guide

Open the contributing guide

Research direction

Start at Startup.Configuration and the app.UseHangfireServer(new MyProcess()) call, then inspect how IBackgroundProcess instances are represented in the Dashboard. Check whether the dashboard has an existing entry point for background processes and define what visibility should include before changing behavior. Done means the registered process appears in the Dashboard and the relevant behavior is covered by tests, if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.