diff --git a/puppet/zulip/manifests/base.pp b/puppet/zulip/manifests/base.pp index 76d657de17..4695fb83a8 100644 --- a/puppet/zulip/manifests/base.pp +++ b/puppet/zulip/manifests/base.pp @@ -46,6 +46,7 @@ class zulip::base { 'error_reports', 'feedback_messages', 'invites', + 'missedmessage_email_senders', 'email_senders', 'missedmessage_emails', 'missedmessage_mobile_notifications', diff --git a/puppet/zulip_ops/files/nagios3/conf.d/services.cfg b/puppet/zulip_ops/files/nagios3/conf.d/services.cfg index ee19f2c4eb..02b2095a95 100644 --- a/puppet/zulip_ops/files/nagios3/conf.d/services.cfg +++ b/puppet/zulip_ops/files/nagios3/conf.d/services.cfg @@ -555,6 +555,15 @@ define service { contact_groups admins } +define service { + use generic-service + service_description Check missedmessage_email_senders queue processor + check_command check_remote_arg_string!manage.py process_queue --queue_name=missedmessage_email_senders!1:1!1:1 + max_check_attempts 3 + hostgroup_name frontends + contact_groups admins +} + define service { use generic-service service_description Check email_senders queue processor diff --git a/scripts/nagios/check-rabbitmq-consumers b/scripts/nagios/check-rabbitmq-consumers index 264b06adb1..f05fb301af 100755 --- a/scripts/nagios/check-rabbitmq-consumers +++ b/scripts/nagios/check-rabbitmq-consumers @@ -50,6 +50,7 @@ queues = { 'invites', 'message_sender', 'missedmessage_emails', + 'missedmessage_email_senders', 'email_senders', 'missedmessage_mobile_notifications', 'outgoing_webhooks', diff --git a/tools/test-queue-worker-reload b/tools/test-queue-worker-reload index 758a56ea44..f95f6ac15b 100755 --- a/tools/test-queue-worker-reload +++ b/tools/test-queue-worker-reload @@ -17,7 +17,7 @@ from typing import IO, Text # TODO: Convert this to use scripts/lib/queue_workers.py TOOLS_DIR = os.path.dirname(os.path.abspath(__file__)) successful_worker_launches = [ - '[process_queue] 19 queue worker threads were launched', + '[process_queue] 20 queue worker threads were launched', ] def check_worker_launch(logfile_name): diff --git a/zerver/worker/queue_processors.py b/zerver/worker/queue_processors.py index 1d815bf39f..36a649a663 100644 --- a/zerver/worker/queue_processors.py +++ b/zerver/worker/queue_processors.py @@ -308,6 +308,19 @@ class EmailSendingWorker(QueueProcessingWorker): del copied_event['failed_tries'] send_email_from_dict(copied_event) +@assign_queue('missedmessage_email_senders') +class MissedMessageSendingWorker(EmailSendingWorker): + """ + Note: Class decorators are not inherited. + + The `missedmessage_email_senders` queue was used up through 1.7.1, so we + keep consuming from it in case we've just upgraded from an old version. + After the 1.8 release, we can delete it and tell admins to upgrade to 1.8 + first. + """ + # TODO: zulip-1.8: Delete code related to missedmessage_email_senders queue. + pass + @assign_queue('missedmessage_mobile_notifications') class PushNotificationsWorker(QueueProcessingWorker): def consume(self, data):