2
0
mirror of https://github.com/frappe/bench.git synced 2025-02-03 11:28:24 +00:00

change gunicorn cwd to sites dir

This commit is contained in:
Pratik Vyas 2014-08-22 18:56:15 +05:30
parent ba4bdafe44
commit 23d6de2816
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,4 @@
[program:frappe-web]
environment=SITES_PATH='{{ bench_dir }}/sites'
command={{ bench_dir }}/env/bin/gunicorn -b 127.0.0.1:8000 -w 2 -t 120 frappe.app:application
autostart=true
autorestart=true
@ -7,6 +6,7 @@ stopsignal=QUIT
stdout_logfile={{ bench_dir }}/logs/web.log
stderr_logfile={{ bench_dir }}/logs/web.error.log
user={{ user }}
directory={{ sites_dir }}
[program:frappe-worker]
command={{ bench_dir }}/env/bin/python -m frappe.celery_app worker

View File

@ -55,7 +55,7 @@ def exec_cmd(cmd, cwd='.'):
try:
subprocess.check_call(cmd, cwd=cwd, shell=True)
except subprocess.CalledProcessError, e:
print "Error:", e.output
print "Error:", getattr(e, "output", None) or getattr(e, "error", None)
raise
def setup_env(bench='.'):