Hi,
I new to hangfire, so sorry if this is something obvious.
So, I am testing the following case: I have jobs running on my application and for some reason, I need to kill my application server. So, I kill the application server, turn in back up again and I need the jobs that were in the processing state before the application server shut down to be re-runed automatically. From my research, I got to the conclusion that hangfire handles this out of the box, without requiring me to set up some specific configuration, but it doesn’t.
From the dashboard, I see my job, but it says that it is aborted because the hangfire server was killed, which makes sense. On app startup I am creating a new hangfire server, every time (UseHangfireServer method does this) and when the application gets to the point where it should re-run the job, it can’t because hangfire is running in the context of the newly created server and the old one stays idle. I think this is the problem, but I am not sure. As I said, my understanding of hangfire is not that great.
Is there something that I should do in order to reuse my old hangfire server (from my understanding that should do the trick) ? Maybe some kind of configuration that I had missed…
Is this, realy the source of my problem or I am looking at the wrong place?