mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 12:03:46 +00:00 
			
		
		
		
	run-dev: Run process_queue with DJANGO_AUTORELOAD_ENV.
In Django 2.2 the autoreload system has changed. DJANGO_AUTORELOAD_ENV env variable should be set when calling code that'll use the autoreloader. Otherwise there's some kind of race condition in the autoreload code when SIGINT is sent, where restart_with_reloader() (called only if the env variable isn't set) has the subprocess module calling p.kill() on a process that's already exited, raising ProcessLookupError and printing an ugly traceback. This causes non-deterministic test-run-dev failures.
This commit is contained in:
		| @@ -10,6 +10,7 @@ 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__) | ||||
| @@ -141,7 +142,8 @@ 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,)], | ||||
|         ['./manage.py', 'process_queue', '--all'] + manage_args, | ||||
|         ['env', '{}=true'.format(DJANGO_AUTORELOAD_ENV), | ||||
|          './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'], | ||||
|   | ||||
		Reference in New Issue
	
	Block a user