Hangfire.Redis.StackExchange icon indicating copy to clipboard operation
Hangfire.Redis.StackExchange copied to clipboard

Fix lost subscription when BackgroundJobServer being stopped

Open niki-timofe opened this issue 4 years ago • 2 comments

Fix lost subscription when BackgroundJobServer being stopped and then recreated

Fixes #89

niki-timofe avatar Jul 16 '20 16:07 niki-timofe

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 ?

marcoCasamento avatar Apr 26 '21 12:04 marcoCasamento

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.

niki-timofe avatar Apr 26 '21 13:04 niki-timofe