marcoCasamento / Hangfire.Redis.StackExchange

HangFire Redis storage based on original (and now unsupported) Hangfire.Redis but using lovely StackExchange.Redis client
Other
452 stars 108 forks source link

Fix lost subscription when BackgroundJobServer being stopped #99

Open niki-timofe opened 4 years ago

niki-timofe commented 4 years ago

Fix lost subscription when BackgroundJobServer being stopped and then recreated

Fixes #89

marcoCasamento commented 3 years ago

Sorry for the very long time, I'd like to merge the request but I don't fully understand the code. Was an error raised on CancellationToken Request ? how does it relates to #89 ?

niki-timofe commented 3 years ago

Oh, it was a very long time ago. But as far as I remember, we faced an issue, while trying to implement switching between data-centers mechanics. Our idea was to have running, but passive instances in reserving DC. The issue is that when switching, server won't receive new jobs, because ISubscriber and ResetEvent have been disposed.

Seems like it relates to #89 by the error message.

For now, fork with my changes is running in production, and there are no issues with Redis.