Replies: 1 comment
-
I've never wanted to do this because of the worst case: what happens when you accidentally configure all processes to opt-out? It also, as you note, allows you to workaround Sidekiq's "one Redis per app" rule which is not a good reason to do it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Due to legacy reasons, we have a shared Redis database between two separate Rails apps (app A & app B). Only app A has definitions for the periodic jobs. Everything works great if a Sidekiq instance running app A is elected as the leader of the senate. However, if a Sidekiq instance running app B is elected as the leader, periodic jobs stop working (as app B doesn't define periodic jobs).
We've fixed this temporarily by patching
Sidekiq::Senate#stage_coup!
to always returnfalse
in app B, however a config option to let a Sidekiq instance just opt out of becoming leader would be nice.This has been discussed in past (#4078 and #3771) with a conclusion that sharing a Redis db between two different apps is a bad idea. The scope of this thread is to find out if it would be feasible to just add an option to let a Sidekiq worker opt out of becoming the leader.
Beta Was this translation helpful? Give feedback.
All reactions