Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question on Sidekiq Leader and Periodic Jobs #4078

Closed
goncalopereira opened this issue Jan 9, 2019 · 3 comments
Closed

Question on Sidekiq Leader and Periodic Jobs #4078

goncalopereira opened this issue Jan 9, 2019 · 3 comments

Comments

@goncalopereira
Copy link

Ruby version: 2.4.5
Sidekiq / Pro / Enterprise version(s): Sidekiq 5.2.5 / Pro 4.0.4 / Ent 1.7.2

Hi,
I've separated my workers on multiple projects attached to the same cluster.

On one project the worker is a Slack Bot

On another project I have Cron Jobs running through Periodic

I've noticed that if I restart the Slack Bot workers might become Leader, which has no list of Periodic jobs so they simply disappear.
The Slack Bots do not use the 'cronjob' queue.

Is there a way to attach Periodic Jobs independent of the Leader,
prevent the Slack Bot workers becoming Leaders OR
another solution?

Right now the Periodic Jobs seem to be a SPOF attached to the unique Leader and cannot be a mix of different lists of Periodics on different projects.

Kind Regards

@mperham
Copy link
Collaborator

mperham commented Jan 9, 2019

Different apps cannot have different Sidekiq config but share the same Redis database. I would configure one app to use a different Redis database:

config.redis = { db: 1 }

@goncalopereira
Copy link
Author

Hi,
In my scenario, following your advice, I'd have apps that would need to queue Workers on different databases, is this possible?

@mperham
Copy link
Collaborator

mperham commented Jan 10, 2019

See Sharding wiki page.

@mperham mperham closed this as completed Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants