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.

health: Disable RabbitMQ check if not USING_RABBITMQ.

Anders Kaseorgff97788b6e4b
diff --git a/zerver/views/health.py b/zerver/views/health.py
index 9d2ce56ffe5..5662536c93b 100644
--- a/zerver/views/health.py
+++ b/zerver/views/health.py
@@ -1,3 +1,4 @@
+from django.conf import settings
from django.db.migrations.recorder import MigrationRecorder
from django.http import HttpRequest, HttpResponse
from django.utils.crypto import get_random_string
@@ -58,7 +59,8 @@ def check_memcached() -> None:
def health(request: HttpRequest) -> HttpResponse:
check_database()
- check_rabbitmq()
+ if settings.USING_RABBITMQ: # nocoverage
+ check_rabbitmq()
check_redis()
check_memcached()