celerybeat-mongo: Non-default connection and database location settings are not used
Even though I added the correct keys into my celery app.conf, celerybeat-mongo does not find / uses them and falls back to the default collection, db and host-uri.
app.conf.update(
CELERY_MONGODB_SCHEDULER_DB="database",
CELERY_MONGODB_SCHEDULER_COLLECTION="schedules",
CELERY_MONGODB_SCHEDULER_URL="mongodb://127.0.0.1:27017"
)
For whatever reason the current_app.conf does not hold the keys above and the defaults are initialized. I confirmed that the above config is send correctly to the celery app, I can manually retrieve the settings and the values match as they where set in the app.conf.update above.
With some minor alterations to the MongoScheduler init method (close to the same changes @rafaelreuber suggests to the MongoScheduler instantiation) I was able to succesfully push non-default settings towards celerybeat-mongo.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 15 (6 by maintainers)
Commits related to this issue
- [Fix #56]: Fixed custom settings not being read from celery configuration — committed to P-T-I/celerybeat-mongo by P-T-I 4 years ago
Hey @rafaelreuber
I also installed your archive and it solved the problem !
But when I install the one one pypi repo, I have the problem I described in my last post.