1

We're stuck (for now) with hundreds of legacy objects that use static members extensively.

If I enqueue or schedule a job using these legacy objects, and two or more run in parallel, I'm almost guaranteed to get the static state stepped on.

I'd like an option in HangFire to force Jobs to run in their own appdomains, but it appears not to offer that option.

Have I missed some obscure configuration that will enable that?

Or, if not, has anyone written an extension of the Job that does this?

  • 2
    Sounds like you're trying to hack a solution to get around some bad code. Fix the bad code rather than putting in nasty workarounds. – DavidG Jun 20 '18 at 20:26
  • Thanks @DavidG--I know...believe me, I know. But it's not economical to fix 400kloc, when we're starting to write vNext already; wasted effort. Just Band-Aid & Duct-Tape(tm) until we can retire the old buggy. – methylamine Jun 20 '18 at 20:32

0 Answers0