worker settings

This commit is contained in:
charlesxie
2022-03-02 16:31:46 +08:00
parent 928070e748
commit 11b66ed7c6

View File

@@ -139,7 +139,7 @@ serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
;files = relative/directory/*.ini
[program:uwsgi]
[program:gunicorn]
user = root
directory = /root/dj-flow
command = /usr/bin/gunicorn -w 1 -k gevent -b 127.0.0.1:8001 dj_flow.wsgi:application
@@ -147,4 +147,14 @@ autostart=true
autorestart=true
# 日志
stdout_logfile=/root/logs/dj-flow/supervisor/wsgi_out.log
stderr_logfile=/root/logs/dj-flow/supervisor/wsgi_err.log
stderr_logfile=/root/logs/dj-flow/supervisor/wsgi_err.log
[program:worker]
user = root
directory = /root/dj-flow
command = python manage.py celery worker -Q er_execute,er_schedule -l info -P gevent
autostart=true
autorestart=true
# 日志
stdout_logfile=/root/logs/dj-flow/supervisor/worker_out.log
stderr_logfile=/root/logs/dj-flow/supervisor/worker_err.log