mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
push_notifications: Shard mobile push notifications.
This commit is contained in:
@@ -157,6 +157,7 @@ class zulip::app_frontend_base {
|
||||
} else {
|
||||
$uwsgi_default_processes = 3
|
||||
}
|
||||
$mobile_notification_shards = Integer(zulipconf('application_server','mobile_notification_shards', 1))
|
||||
$tornado_ports = $zulip::tornado_sharding::tornado_ports
|
||||
|
||||
$proxy_host = zulipconf('http_proxy', 'host', 'localhost')
|
||||
|
@@ -61,7 +61,16 @@ directory=/home/zulip/deployments/current/
|
||||
<% if @queues_multiprocess %>
|
||||
<% @queues.each do |queue| -%>
|
||||
[program:zulip_events_<%= queue %>]
|
||||
<% if queue == "missedmessage_mobile_notifications" and @mobile_notification_shards > 1 -%>
|
||||
process_name=zulip_events_<%= queue %>_shard%(process_num)s
|
||||
command=nice -n10 /home/zulip/deployments/current/manage.py process_queue --queue_name=<%= queue %> --skip-checks --worker_num %(process_num)s
|
||||
stdout_logfile=/var/log/zulip/events_<%= queue %>_shard%(process_num)s.log ; stdout log path, NONE for none; default AUTO
|
||||
numprocs=<%= @mobile_notification_shards %>
|
||||
numprocs_start=1
|
||||
<% else -%>
|
||||
command=nice -n10 /home/zulip/deployments/current/manage.py process_queue --queue_name=<%= queue %> --skip-checks
|
||||
stdout_logfile=/var/log/zulip/events_<%= queue %>.log ; stdout log path, NONE for none; default AUTO
|
||||
<%end -%>
|
||||
environment=HTTP_proxy="<%= @proxy %>",HTTPS_proxy="<%= @proxy %>"
|
||||
priority=300 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
@@ -70,7 +79,6 @@ stopsignal=TERM ; signal used to kill process (default TERM)
|
||||
stopwaitsecs=30 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
user=zulip ; setuid to this UNIX account to run the program
|
||||
redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
stdout_logfile=/var/log/zulip/events_<%= queue %>.log ; stdout log path, NONE for none; default AUTO
|
||||
stdout_logfile_maxbytes=20MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stdout_logfile_backups=3 ; # of stdout logfile backups (default 10)
|
||||
directory=/home/zulip/deployments/current/
|
||||
|
Reference in New Issue
Block a user