mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-10 19:57:09 +03:00
Add celery prefix for configuration (#1676)
* Add celery prefix for configuration * Update CONTRIBUTORS.rst
This commit is contained in:
parent
07060eaecc
commit
83b5f00ac5
|
@ -87,6 +87,7 @@ Listed in alphabetical order.
|
|||
David Díaz `@ddiazpinto`_ @DavidDiazPinto
|
||||
Davur Clementsen `@dsclementsen`_ @davur
|
||||
Delio Castillo `@jangeador`_ @jangeador
|
||||
Denis Orehovsky `@apirobot`_
|
||||
Dónal Adams `@epileptic-fish`_
|
||||
Dong Huynh `@trungdong`_
|
||||
Emanuel Calso `@bloodpet`_ @bloodpet
|
||||
|
@ -172,6 +173,7 @@ Listed in alphabetical order.
|
|||
.. _@amjith: https://github.com/amjith
|
||||
.. _@andor-pierdelacabeza: https://github.com/andor-pierdelacabeza
|
||||
.. _@antoniablair: https://github.com/antoniablair
|
||||
.. _@apirobot: https://github.com/apirobot
|
||||
.. _@archinal: https://github.com/archinal
|
||||
.. _@areski: https://github.com/areski
|
||||
.. _@arruda: https://github.com/arruda
|
||||
|
|
|
@ -20,7 +20,9 @@ class CeleryAppConfig(AppConfig):
|
|||
def ready(self):
|
||||
# Using a string here means the worker will not have to
|
||||
# pickle the object when using Windows.
|
||||
app.config_from_object('django.conf:settings')
|
||||
# - namespace='CELERY' means all celery-related configuration keys
|
||||
# should have a `CELERY_` prefix.
|
||||
app.config_from_object('django.conf:settings', namespace='CELERY')
|
||||
installed_apps = [app_config.name for app_config in apps.get_app_configs()]
|
||||
app.autodiscover_tasks(lambda: installed_apps, force=True)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user