HangfireIO / Hangfire

An easy way to perform background job processing in .NET and .NET Core applications. No Windows Service or separate process required
https://www.hangfire.io
Other
9.37k stars 1.7k forks source link

Recurring jobs Could not resolve assembly (2 project on 1 db) #1732

Open jerateep opened 4 years ago

jerateep commented 4 years ago

I have 2 web site (asp.net core 3.1) I want to show Recurring jobs only the work created at each website. Own only How to show only the Recurring jobs created at each website? image

mc2002tii commented 4 years ago

If you have multiple applications sharing the same Hangfire database then you have to have a create an interface shared between the applications with each application implementing its own relevant part of the interface. See https://docs.hangfire.io/en/latest/background-processing/placing-processing-into-another-process.html?highlight=interface for a hint about that (there are probably better examples out there, but it's what I could find in a quick search).

It is doable, but a real pain to deal with in a complex application with code split between front end and back end services where you want to have different parts feed and consume from queues; recurring jobs make the problem even worse. Having implemented it that way in one application, I would not do it again and am starting to re-engineer the system to use an external queueing system (AWS SQS) instead. Hangfire is really good at some things, but this is a big weak spot.