Skip to content

Commit

Permalink
app_cfg: Only set depot.storage_path default if backend is not config…
Browse files Browse the repository at this point in the history
…ured

This option isn't used by anything but the local storage backend (the
default).
  • Loading branch information
jackrosenthal committed Feb 14, 2024
1 parent 2b7b0b3 commit c8d55c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions algobowl/config/app_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
]

base_config["auth.mpapi.url"] = "https://mastergo.mines.edu/mpapi"
base_config["depot.storage_path"] = "/tmp/depot"


def variable_provider():
Expand All @@ -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)
Expand Down

0 comments on commit c8d55c0

Please sign in to comment.