Is it possible to configure two Database for Hangfire from Single ASP.NET Core console application.
What exactly is it you are trying to have two of?
You mean you want to monitor two Hangfire databases with the same Hangfire Dashboard?
A Hangfire Dashboard can only monitor one Hangfire database.
I guess you could alter the Hangfire Dashboard to handle more than one Hangfire database, but that is probably not simple and you would have to do it yourself. I have never heard or seen anyone having done this.
I’m trying to schedule a jobs simultaneously for two Databases.
Basically I have two projects
- Gateway - ASP .Net Core Console application
- Pipeline - Web API.
Both are using hangfire to schedule job have different Databases, But in some cases I need to have schedule job in gateway hangfire and pipeline hangfire from Gateway only.
Is such thing possible?
As far as I know Hangfire is annoyingly only designed to use static classes, so I doubt you can use two Hangfire setups at the same time. Might not be impossible, but I sure wouldn’t want to try it.
But I still aren’t totally sure what you are trying to do, and I can’t call myself anything near a Hangfire expert. I am mainly here to complain about #595 not being fixed yet.