-
-
Notifications
You must be signed in to change notification settings - Fork 230
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
Heroku / dokku and "ValueError: There's already an active RQ scheduler" #93
Comments
|
I like this idea, please see my comment here: #70 (comment) |
Any suggestions how to fix that? |
remove all keys in redis if your in development |
I'm running dokku, which is a "Docker powered mini-Heroku in around 100 lines of Bash".
I switched to RQ a few weeks ago after celery kept locking up workers due to a deep multi-threading issue in python. RQ is working perfectly except for one small issue...
When I 'git push' my code up to my server, dokku creates a new container with the updated code, then it starts all the services in the NEW container, makes sure they are running, switches traffic to the new container, then shuts down the old container.
The only problem is that rq-scheduler checks to see if there is an active instance of the scheduler running. Unfortunately there is--in the old container that is about to get killed.
In my case, I don't care if the about-to-die-scheduler queues up a bunch of jobs in an instant before the new scheduler comes up and queues the same jobs up.
Would a command-line flag to ignore an already running scheduler, be useful?
Another option might be to allow multiple schedulers to run, but only the one that holds the lock can submit new tasks. If it dies, and the lock expires, another scheduler could grab it and start submitting...
I'd be willing to try my hand at writing a patch if you approve of either idea.
The text was updated successfully, but these errors were encountered: