mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
supervisor: Use more specific process_name than "port-9800".
Making this include "zulip-tornado" makes it clearer in supervisor logs. Without this, one only sees: ``` 2020-09-14 03:43:13,788 INFO waiting for port-9807 to stop 2020-09-14 03:43:14,466 INFO stopped: port-9807 (exit status 1) 2020-09-14 03:43:14,469 INFO spawned: 'port-9807' with pid 24289 2020-09-14 03:43:15,470 INFO success: port-9807 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) ```
This commit is contained in:
committed by
Tim Abbott
parent
812af977d3
commit
efdaa58c24
@@ -26,7 +26,7 @@ directory=/home/zulip/deployments/current/
|
|||||||
<% if @tornado_multiprocess -%>
|
<% if @tornado_multiprocess -%>
|
||||||
[program:zulip-tornado]
|
[program:zulip-tornado]
|
||||||
command=env PYTHONUNBUFFERED=1 /home/zulip/deployments/current/manage.py runtornado 127.0.0.1:98%(process_num)02d
|
command=env PYTHONUNBUFFERED=1 /home/zulip/deployments/current/manage.py runtornado 127.0.0.1:98%(process_num)02d
|
||||||
process_name=port-98%(process_num)02d
|
process_name=zulip-tornado-port-98%(process_num)02d
|
||||||
priority=200 ; the relative start priority (default 999)
|
priority=200 ; the relative start priority (default 999)
|
||||||
autostart=true ; start at supervisord start (default: true)
|
autostart=true ; start at supervisord start (default: true)
|
||||||
autorestart=true ; whether/when to restart (default: unexpected)
|
autorestart=true ; whether/when to restart (default: unexpected)
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ if tornado_processes > 1:
|
|||||||
# supervisord group where if any individual process is slow to
|
# supervisord group where if any individual process is slow to
|
||||||
# stop, the whole bundle stays stopped for an extended time.
|
# stop, the whole bundle stays stopped for an extended time.
|
||||||
logging.info("Restarting Tornado process on port %s", p)
|
logging.info("Restarting Tornado process on port %s", p)
|
||||||
subprocess.check_call(["supervisorctl", "restart", f"zulip-tornado:port-{p}"])
|
subprocess.check_call(["supervisorctl", "restart", f"zulip-tornado:zulip-tornado-port-{p}"])
|
||||||
else:
|
else:
|
||||||
logging.info("Restarting Tornado process")
|
logging.info("Restarting Tornado process")
|
||||||
subprocess.check_call(["supervisorctl", "restart", "zulip-tornado", "zulip-tornado:*"])
|
subprocess.check_call(["supervisorctl", "restart", "zulip-tornado", "zulip-tornado:*"])
|
||||||
|
|||||||
Reference in New Issue
Block a user