Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

puppet: Move normal_queues to the one place that uses it.

Alex Vandiver25e995b67759
diff --git a/docs/subsystems/queuing.md b/docs/subsystems/queuing.md
index 76dd140c597..d43a768e881 100644
--- a/docs/subsystems/queuing.md
+++ b/docs/subsystems/queuing.md
@@ -44,11 +44,10 @@ To add a new queue processor:
a single queue processor manually using e.g. `./manage.py
process_queue --queue=user_activity`.
-* So that supervisord will known to run the queue processor in
- production, you will need to add to to `normal_queues` in
- `puppet/zulip/manifests/base.pp`; the list there is used to generate
- `/etc/supervisor/conf.d/zulip.conf` via a puppet template in
- `app_frontend.pp`.
+* So that supervisord will know to run the queue processor in
+ production, you will need to add to the `queues` variable in
+ `puppet/zulip/manifests/app_frontend_base.pp`; the list there is
+ used to generate `/etc/supervisor/conf.d/zulip.conf`.
The queue will automatically be added to the list of queues tracked by
`scripts/nagios/check-rabbitmq-consumers`, so Nagios can properly
diff --git a/puppet/zulip/manifests/app_frontend_base.pp b/puppet/zulip/manifests/app_frontend_base.pp
index ab1e90e6dbc..39a219c75f4 100644
--- a/puppet/zulip/manifests/app_frontend_base.pp
+++ b/puppet/zulip/manifests/app_frontend_base.pp
@@ -66,7 +66,23 @@ class zulip::app_frontend_base {
# multiprocess. Multiprocess scales much better, but requires more
# RAM; we just auto-detect based on available system RAM.
$queues_multiprocess = $zulip::base::total_memory_mb > 3500
- $queues = $zulip::base::normal_queues
+ $queues = [
+ 'deferred_work',
+ 'digest_emails',
+ 'email_mirror',
+ 'embed_links',
+ 'embedded_bots',
+ 'error_reports',
+ 'invites',
+ 'email_senders',
+ 'missedmessage_emails',
+ 'missedmessage_mobile_notifications',
+ 'outgoing_webhooks',
+ 'signups',
+ 'user_activity',
+ 'user_activity_interval',
+ 'user_presence',
+ ]
if $queues_multiprocess {
$uwsgi_default_processes = 6
} else {
diff --git a/puppet/zulip/manifests/base.pp b/puppet/zulip/manifests/base.pp
index a8350fc177c..9fb9d98ff44 100644
--- a/puppet/zulip/manifests/base.pp
+++ b/puppet/zulip/manifests/base.pp
@@ -67,24 +67,6 @@ class zulip::base {
$postgres_version = zulipconf('postgresql', 'version', undef)
- $normal_queues = [
- 'deferred_work',
- 'digest_emails',
- 'email_mirror',
- 'embed_links',
- 'embedded_bots',
- 'error_reports',
- 'invites',
- 'email_senders',
- 'missedmessage_emails',
- 'missedmessage_mobile_notifications',
- 'outgoing_webhooks',
- 'signups',
- 'user_activity',
- 'user_activity_interval',
- 'user_presence',
- ]
-
$total_memory_mb = Integer($::memorysize_mb);
group { 'zulip':