From 0b3f1ae822d7fe198710a5d27bfcff87fad51453 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Sun, 20 Dec 2020 17:30:22 +0100 Subject: [PATCH] config: Read Redis URL from environment variables if available --- config/default.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/default.py b/config/default.py index 5cf7e572a6..66c276f019 100644 --- a/config/default.py +++ b/config/default.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +import os import os.path here = os.path.abspath(os.path.dirname(__file__)) @@ -44,8 +45,8 @@ SKYLINES_MAP_TILE_URL = "https://www.skylines.aero/mapproxy" -BROKER_URL = "redis://localhost:6379/0" -CELERY_RESULT_BACKEND = "redis://localhost:6379/0" +BROKER_URL = os.getenv("REDIS_URL", "redis://localhost:6379/0") +CELERY_RESULT_BACKEND = os.getenv("REDIS_URL", "redis://localhost:6379/0") CELERYD_LOG_LEVEL = "INFO" # limits for AnalyseFlight