Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration Heartbeat AddHangFireServer #13

Open
famda opened this issue Dec 23, 2021 · 3 comments
Open

Configuration Heartbeat AddHangFireServer #13

famda opened this issue Dec 23, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@famda
Copy link

famda commented Dec 23, 2021

Hi,

I'm using this library for quite a while now.
I did an upgrade to hangfire an they are changing the signature of the method that I used to configure the ProcessMonitor.

Is it possible to provide a new configuration method using the IServiceCollection extension method to add the ProcessMonitor into additional processes?

Now the configuration must be on ConfigureServices method.

image

The JobStorage cannot be null anymore (starting on version 2).

@ahydrax
Copy link
Owner

ahydrax commented Dec 24, 2021

Hi @famda ,

I'll look into it. Thanks.

@ahydrax ahydrax added the enhancement New feature or request label Dec 24, 2021
@ahydrax ahydrax self-assigned this Dec 24, 2021
@Pouleyy
Copy link

Pouleyy commented Dec 4, 2022

Hello @famda
I've come to the same issue. If you're using a storage for your jobs you just need to provide it.
For example I've this :

builder.Services.AddHangfireServer((_, options) =>
{
    options.WorkerCount = 1;
}, 
new SQLiteStorage(ypurConnectionString), 
new[] { new ProcessMonitor(checkInterval: TimeSpan.FromSeconds(5))
});

@dodu2014
Copy link

dodu2014 commented Jan 5, 2024

Hello @famda I've come to the same issue. If you're using a storage for your jobs you just need to provide it. For example I've this :

builder.Services.AddHangfireServer((_, options) =>
{
    options.WorkerCount = 1;
}, 
new SQLiteStorage(ypurConnectionString), 
new[] { new ProcessMonitor(checkInterval: TimeSpan.FromSeconds(5))
});

The type 'ProcessMonitor' exists in both 'Hangfire. Heartbeat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' and 'Hangfire. HttpJob, Version=3.8.2.0, Culture=neutral, PublicKeyToken=null'

How to use Heartbeta while using HttpJob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants