]> git.parisson.com Git - teleforma.git/commitdiff
add DEBUG mode for CHANNEL_URL (if false, the unix socket is used)
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 19 Jan 2023 13:09:55 +0000 (14:09 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 19 Jan 2023 13:09:55 +0000 (14:09 +0100)
app/settings.py

index 402b58d8906e460f74f797d5b3ddf8430845737f..43e4d5f7b334dad2f78a932127bd706c682d45b4 100644 (file)
@@ -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': {