From a6624f04db3730e430cd22fb9c841cac42b70b0a Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 17 Mar 2020 18:22:44 -0700 Subject: [PATCH] Revert "run-dev: Run process_queue with DJANGO_AUTORELOAD_ENV." This reverts commit 36a8e61e67deb71d875382b2054c3286e2fe5dbb (#13934). The Django 2.2 autoreloader works by forking into a child process that exits with status 3 when a file changes, and a parent process that restarts the child when it exits with status 3. Setting this environment variable had the effect of pretending we were already the child process, without a parent process to restart it. Therefore, changing any code used by the queue processor caused it to exit rather than restart. Signed-off-by: Anders Kaseorg --- tools/run-dev.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/run-dev.py b/tools/run-dev.py index 4e7b3039ab..d237fae79a 100755 --- a/tools/run-dev.py +++ b/tools/run-dev.py @@ -10,7 +10,6 @@ import traceback from urllib.parse import urlunparse -from django.utils.autoreload import DJANGO_AUTORELOAD_ENV # check for the venv from lib import sanity_check sanity_check.check_venv(__file__) @@ -142,8 +141,7 @@ cmds = [['./manage.py', 'runserver'] + manage_args + runserver_args + ['127.0.0.1:%d' % (django_port,)], ['env', 'PYTHONUNBUFFERED=1', './manage.py', 'runtornado'] + manage_args + ['127.0.0.1:%d' % (tornado_port,)], - ['env', '{}=true'.format(DJANGO_AUTORELOAD_ENV), - './manage.py', 'process_queue', '--all'] + manage_args, + ['./manage.py', 'process_queue', '--all'] + manage_args, ['env', 'PGHOST=127.0.0.1', # Force password authentication using .pgpass './puppet/zulip/files/postgresql/process_fts_updates'], ['./manage.py', 'deliver_scheduled_messages'],