From 2afa25ca270f57d9a9c9a546c1d31bc468c3a6b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 15 Sep 2023 09:10:35 +0200 Subject: [PATCH] master: move DB_URL to global variable --- buildbot_nix/master.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildbot_nix/master.py b/buildbot_nix/master.py index 51a7cc1..b48c560 100644 --- a/buildbot_nix/master.py +++ b/buildbot_nix/master.py @@ -44,6 +44,7 @@ BUILDBOT_URL = os.environ["BUILDBOT_URL"] BUILDBOT_GITHUB_USER = os.environ["BUILDBOT_GITHUB_USER"] NIX_SUPPORTED_SYSTEMS = os.environ["NIX_SUPPORTED_SYSTEMS"].split(" ") NIX_EVAL_MAX_MEMORY_SIZE = int(os.environ.get("NIX_EVAL_MAX_MEMORY_SIZE", "4096")) +BUILDBOT_DB_URL = os.environ.get("DB_URL", "sqlite:///state.sqlite") def config_for_project( @@ -225,7 +226,7 @@ def build_config() -> dict[str, Any]: ), } - c["db"] = {"db_url": os.environ.get("DB_URL", "sqlite:///state.sqlite")} + c["db"] = {"db_url": BUILDBOT_DB_URL} c["protocols"] = {"pb": {"port": "tcp:9989:interface=\\:\\:"}} c["buildbotURL"] = BUILDBOT_URL