I have an existing api that stores data per-thread and is retrieved using HttpContext.Current
.
I'm trying to refactor this class to be called from a hangfire job -- I want to know if there is an equivalent static method for retrieving the hangfire execution context.
If not, I would also like to know if there is a 1:1 relationship between hangfire jobs and threads. I couldn't find any documentation about the lifetime of a hangfire job -- ie threadstart -> job start -> job end -> thread dispose
, or if 1 thread could process multiple jobs simultaneously, ie threadstart -> job1 start, job2 start, job3 start, job1 end, job4 start,job2 end, job1 end, job3 end -> thread dispose