-
Notifications
You must be signed in to change notification settings - Fork 236
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
Remember dynamic schedule on deploys #188
Comments
Nice one keeping this out here. Our workaround involved writing a job that runs on starting sidekiq. |
I think you can set |
Alright thanks @rrrcompagnoni I will try that out too. |
@snmgian any news about it? |
I think this comment handles this use case (i.e. you can just run |
It ceratinly seems like the scheduler should load from Redis on boot if dynamic, the line at
The code there already runs |
Found it. This line is clearing the "schedules" key out of redis on startup:
I assume that shouldn't happen if the schedule is set to |
Hi! I just started using your gem. I found it very useful because it allows to make dynamic schedules.
I also found that it does not remember the last schedule if I restart my Sidekiq process. It usually happens on deployment.
I thought about hooking into deployment process to create a file and write to it the latest
Sidekiq.get_schedule
value. After successful start of Sidekiq I need to do the same thing as described here.So in the end I will have the following configuration for Sidekiq:
This code is wrong, it just shows the basic idea.
Maybe my findings can be useful for someone else.
--
UPD. I've updated configuration example, now it is correct and is used in my project. I want to point that for me it is also important to remember the next time a job will be enqueued
The text was updated successfully, but these errors were encountered: