From c75cd7d41ff9e300d2083f0923d5359bb003404b Mon Sep 17 00:00:00 2001 From: keithjeb Date: Thu, 21 Feb 2019 22:19:22 +0100 Subject: [PATCH] Added note regarding celery always eager Added a note around CELERY_TASK_ALWAYS_EAGER = True in docker config for local development. This causes tasks to be executed on the 'main' thread rather than by the workers. I understand why that might be desirable, but thought it worth calling out incase (like me) it makes people think something is broken. --- docs/developing-locally-docker.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index 08b25f3bc..e770164b2 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -171,6 +171,13 @@ When developing locally you can go with MailHog_ for email testing provided ``us .. _Mailhog: https://github.com/mailhog/MailHog/ +.. _`CeleryTasks`: + +Celery tasks in local development +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +By default Celery tasks are set to 'eager' during local development. This results in tasks being evaluated as normal functions which will not reach the redis queue. + +If you need tasks to be executed by a worker during development set CELERY_TASK_ALWAYS_EAGER = False in config/settings/local.py .. _`CeleryFlower`: