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

Allow for multiple applications to share a Redis DB #401

Merged

Conversation

TALlama
Copy link
Contributor

@TALlama TALlama commented Aug 23, 2022

Implements #400

Adds the ability to set a key_prefix which will be prepended to all Redis keys. This allows multiple applications to keep their schedules in the same Redis database without clobbering each other.

This change does not affect the runtime of the RSpec suite, but allows for the use case mentioned. Doing the first two commits without the last one would allow for monkey patches, but if we could do the whole thing that would be great.

Copy link
Member

@marcelolx marcelolx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get some documentation about it added to the README.md?

@TALlama
Copy link
Contributor Author

TALlama commented Aug 23, 2022

@marcelolx added.

@TALlama
Copy link
Contributor Author

TALlama commented Aug 23, 2022

Also heads up that the link to the commit message style guide on CONTRIBUTING.md is broken

@marcelolx
Copy link
Member

Thanks @TALlama! I'll look into updating the contributing guide.

Added the PR to my list to review, as soon as I have time I'll take a final look

Copy link
Member

@marcelolx marcelolx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @TALlama! It looks good to me, there is just a conflict, once that is fixed I'll merge this PR (if you don't have time, don't mind, I can fix it)

Most other keys are centralized in `SidekiqScheduler::RedisManager` as class methods. This does the same with the "schedules" key.
Most other keys are centralized in `SidekiqScheduler::RedisManager` as class methods. This does the same with the "schedules_changed" key.
Adds the ability to set a `key_prefix` which will be prepended to all Redis keys. This allows multiple applications to keep their schedules in the same Redis database without clobbering each other.
@marcelolx marcelolx merged commit 8ad1f74 into sidekiq-scheduler:master Sep 8, 2022
@marcelolx
Copy link
Member

Thanks @TALlama! I have to fix the CI to run the tests, but from what I remember the last time it did pass, so probably nothing is broken.

Thank you for your patience!

@TALlama TALlama deleted the feature/multi-app-same-db branch September 8, 2022 17:01
@TALlama TALlama restored the feature/multi-app-same-db branch September 8, 2022 23:13
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

Successfully merging this pull request may close these issues.

None yet

2 participants