diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 509fb83ae..302b819e2 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -121,6 +121,7 @@ Listed in alphabetical order. Krzysztof Szumny `@noisy`_ Krzysztof Żuraw `@krzysztofzuraw`_ Leonardo Jimenez `@xpostudio4`_ + Leo Zhou `@glasslion`_ Lin Xianyi `@iynaix`_ Luis Nell `@originell`_ Lukas Klein @@ -217,6 +218,7 @@ Listed in alphabetical order. .. _@garry-cairns: https://github.com/garry-cairns .. _@garrypolley: https://github.com/garrypolley .. _@goldhand: https://github.com/goldhand +.. _@glasslion: https://github.com/glasslion .. _@hackebrot: https://github.com/hackebrot .. _@hairychris: https://github.com/hairychris .. _@hendrikschneider: https://github.com/hendrikschneider diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py index b3f0a388b..570abc125 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py @@ -11,6 +11,11 @@ if not settings.configured: app = Celery('{{cookiecutter.project_slug}}') +# Using a string here means the worker will not have to +# pickle the object when using Windows. +# - namespace='CELERY' means all celery-related configuration keys +# should have a `CELERY_` prefix. +app.config_from_object('django.conf:settings', namespace='CELERY') class CeleryAppConfig(AppConfig): @@ -18,11 +23,6 @@ class CeleryAppConfig(AppConfig): verbose_name = 'Celery Config' def ready(self): - # Using a string here means the worker will not have to - # pickle the object when using Windows. - # - 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)