run-dev: Run compile-handlebars-templates inside the pgrp

(imported from commit bb13f8804b7e9e930ecd2542ea8772c76370d32e)
This commit is contained in:
Anders Kaseorg 2015-08-20 15:32:15 -07:00
parent bd66b2139b
commit dd8eda4edc
1 changed files with 2 additions and 4 deletions

View File

@ -65,16 +65,14 @@ os.chdir(os.path.join(os.path.dirname(__file__), '..'))
# Clean up stale .pyc files etc.
subprocess.check_call('./tools/clean-repo')
# Watch for handlebars changes.
subprocess.Popen(['./tools/compile-handlebars-templates', 'forever'])
# Set up a new process group, so that we can later kill run{server,tornado}
# and all of the processes they spawn.
os.setpgrp()
# Pass --nostatic because we configure static serving ourselves in
# zulip/urls.py.
cmds = [['python', 'manage.py', 'runserver', '--nostatic'] +
cmds = [['./tools/compile-handlebars-templates', 'forever'],
['python', 'manage.py', 'runserver', '--nostatic'] +
manage_args + ['localhost:%d' % (django_port,)],
['python', 'manage.py', 'runtornado'] +
manage_args + ['localhost:%d' % (tornado_port,)],