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

Hangfire with Aspire integration #2408

Open
meghuizen opened this issue May 24, 2024 · 2 comments
Open

Hangfire with Aspire integration #2408

meghuizen opened this issue May 24, 2024 · 2 comments

Comments

@meghuizen
Copy link

What I think would be a killer combo is having Hangfire integration in Aspire.
The scenario I would like to see is that you have Aspire running with multiple Hangfire workers on different projects running in Aspire.
The Hangfire dashboard as plugin part of the Aspire dashboard, which will give an overview on all the Hangfire jobs on all the Hangfire workers running in Aspire.
Also the telemetry and logging being visible from Aspire.

@odinserj
Copy link
Member

Looks indeed interesting, but need to understand its component model first. It seems to me that it's possible to integrate Hangfire with its current capabilities, since Aspire is likely using ASP.NET Core infrastructure, so it is likely to see the logs in Aspire dashboard anyway. But more detailed integration would be useful to have.

@adanbrownpaca
Copy link

adanbrownpaca commented May 26, 2024

We should make this simpler - we should add the ability for Hangfire to simply use a DB on the container provide by aspire. Do do this it needs to be able to install the DB seamlessly:

Hangfire Project:
builder.AddSqlServerClient("BackgroundJobsDb");

Aspire:
var sqldbserver = builder.AddSqlServer("DbServer");
var backgroundjobsdb = sqldbserver.AddDatabase("BackgroundJobsDb");
builder.AddProject<Projects.BackgroundJobs>("backgroundjobs")
.WithReference(backgroundjobsdb);

This way the Db gets installed on the local development container and initialized with the schema. Then, this simplifies deployment to Azure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants