Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
queue_processors: Disable missedmesssage worker on staging.
Tim Abbottc134cc3136e5
diff --git a/zerver/worker/missedmessage_emails.py b/zerver/worker/missedmessage_emails.pyindex ef84ef23d58..0e696d39d41 100644--- a/zerver/worker/missedmessage_emails.py+++ b/zerver/worker/missedmessage_emails.py@@ -6,6 +6,7 @@ from datetime import timedeltafrom typing import Anyimport sentry_sdk+from django.conf import settingsfrom django.db import transactionfrom django.db.utils import IntegrityErrorfrom django.utils.timezone import now as timezone_now@@ -111,6 +112,14 @@ class MissedMessageWorker(QueueProcessingWorker):def start(self) -> None:with self.cv:self.stopping = False++ # Do nothing to process events on staging servers, since we do+ # not support running multiple copies of this worker.+ if settings.STAGING:+ with self.cv:+ self.cv.wait()+ return+self.worker_thread = threading.Thread(target=self.work)self.worker_thread.start()super().start()@@ -263,4 +272,8 @@ class MissedMessageWorker(QueueProcessingWorker):self.cv.notify()if self.worker_thread is not None:self.worker_thread.join()++ if settings.STAGING:+ return+super().stop()