From 83dfa175fb436da5d1332afb7217da06b901cc09 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 19 Jan 2023 14:09:55 +0100 Subject: [PATCH] add DEBUG mode for CHANNEL_URL (if false, the unix socket is used) --- app/settings.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/settings.py b/app/settings.py index 402b58d8..43e4d5f7 100644 --- a/app/settings.py +++ b/app/settings.py @@ -60,7 +60,11 @@ CHANNEL_LAYERS = { } # channel access point from django -CHANNEL_URL = "http://channels:8000" +if DEBUG: + CHANNEL_URL = "http://channels:8000" +else: + CHANNEL_URL = "/var/run/app/asgi.sock/ws" + DATABASES = { 'default': { -- 2.39.5