[celery] Using preferred configuration proceedure (#5726)

This commit is contained in:
John Bodley 2018-08-26 20:04:33 -07:00 committed by GitHub
parent f83ea233c7
commit 52b99dff78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -710,7 +710,8 @@ def get_celery_app(config):
global _celery_app global _celery_app
if _celery_app: if _celery_app:
return _celery_app return _celery_app
_celery_app = celery.Celery(config_source=config.get('CELERY_CONFIG')) _celery_app = celery.Celery()
_celery_app.config_from_object(config.get('CELERY_CONFIG'))
return _celery_app return _celery_app