mirror of https://github.com/zulip/zulip.git
run-dev: Eschew useless shells
(imported from commit 34dab15941f5c63f381f5b2b7b78482dbc2b02ea)
This commit is contained in:
parent
664db6b622
commit
bd66b2139b
|
@ -2,7 +2,7 @@
|
|||
|
||||
[program:zulip-dev]
|
||||
; The VM is behind NAT (right, right?); we listen on all interfaces so port mapping works correctly in Vagrant
|
||||
command=bash -c "source /srv/zulip-venv/bin/activate && /srv/zulip/tools/run-dev.py --interface=''"
|
||||
command=bash -c "source /srv/zulip-venv/bin/activate && exec /srv/zulip/tools/run-dev.py --interface=''"
|
||||
user=vagrant
|
||||
redirect_stderr=true
|
||||
directory=/srv/zulip/
|
||||
|
|
|
@ -15,6 +15,6 @@ from zerver.worker.queue_processors import get_active_worker_queues
|
|||
|
||||
queues = get_active_worker_queues()
|
||||
|
||||
args = ' '.join(sys.argv[1:])
|
||||
args = sys.argv[1:]
|
||||
for queue in queues:
|
||||
subprocess.Popen('python manage.py process_queue %s %s' %(args, queue), shell=True)
|
||||
subprocess.Popen(['python', 'manage.py', 'process_queue'] + args + [queue])
|
||||
|
|
|
@ -51,7 +51,7 @@ if options.test:
|
|||
else:
|
||||
settings_module = "zproject.settings"
|
||||
|
||||
manage_args = '--settings=%s' % (settings_module,)
|
||||
manage_args = ['--settings=%s' % (settings_module,)]
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = settings_module
|
||||
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
|
||||
|
@ -66,7 +66,7 @@ os.chdir(os.path.join(os.path.dirname(__file__), '..'))
|
|||
subprocess.check_call('./tools/clean-repo')
|
||||
|
||||
# Watch for handlebars changes.
|
||||
subprocess.Popen('./tools/compile-handlebars-templates forever', shell=True)
|
||||
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.
|
||||
|
@ -74,15 +74,15 @@ os.setpgrp()
|
|||
|
||||
# Pass --nostatic because we configure static serving ourselves in
|
||||
# zulip/urls.py.
|
||||
cmds = ['python manage.py runserver --nostatic %s localhost:%d'
|
||||
% (manage_args, django_port),
|
||||
'python manage.py runtornado %s localhost:%d'
|
||||
% (manage_args, tornado_port),
|
||||
'./tools/run-dev-queue-processors %s' % (manage_args),
|
||||
'./puppet/zulip/files/postgresql/process_fts_updates']
|
||||
cmds = [['python', 'manage.py', 'runserver', '--nostatic'] +
|
||||
manage_args + ['localhost:%d' % (django_port,)],
|
||||
['python', 'manage.py', 'runtornado'] +
|
||||
manage_args + ['localhost:%d' % (tornado_port,)],
|
||||
['./tools/run-dev-queue-processors'] + manage_args,
|
||||
['./puppet/zulip/files/postgresql/process_fts_updates']]
|
||||
|
||||
for cmd in cmds:
|
||||
subprocess.Popen(cmd, shell=True)
|
||||
subprocess.Popen(cmd)
|
||||
|
||||
class Resource(resource.Resource):
|
||||
def getChild(self, name, request):
|
||||
|
|
Loading…
Reference in New Issue