From c8d55c079cd550c3ff604f515ce938167002ae08 Mon Sep 17 00:00:00 2001 From: Jack Rosenthal Date: Wed, 14 Feb 2024 01:37:32 -0700 Subject: [PATCH] app_cfg: Only set depot.storage_path default if backend is not configured This option isn't used by anything but the local storage backend (the default). --- algobowl/config/app_cfg.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/algobowl/config/app_cfg.py b/algobowl/config/app_cfg.py index fe1d7e6..fc750fa 100644 --- a/algobowl/config/app_cfg.py +++ b/algobowl/config/app_cfg.py @@ -77,7 +77,6 @@ ] base_config["auth.mpapi.url"] = "https://mastergo.mines.edu/mpapi" -base_config["depot.storage_path"] = "/tmp/depot" def variable_provider(): @@ -90,7 +89,10 @@ def variable_provider(): def config_ready(): """Executed once the configuration is ready.""" # Configure default depot - DepotManager.configure("default", tg.config) + depot_config = dict(tg.config) + if "depot.backend" not in depot_config: + depot_config.setdefault("depot.storage_path", "/tmp/depot") + DepotManager.configure("default", depot_config) milestones.config_ready.register(config_ready)