1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

add support for POETRY_ prefix for ui build timeout

This commit is contained in:
checktheroads
2021-01-04 00:35:30 -07:00
parent 1f26a6c67b
commit 824a1581af

View File

@@ -104,13 +104,15 @@ async def build_ui(app_path):
RuntimeError: Raised if exit code is not 0. RuntimeError: Raised if exit code is not 0.
RuntimeError: Raised when any other error occurs. RuntimeError: Raised when any other error occurs.
""" """
timeout = 90
try: if "HYPERGLASS_UI_BUILD_TIMEOUT" in os.environ:
timeout = os.environ["HYPERGLASS_UI_BUILD_TIMEOUT"] timeout = int(os.environ["HYPERGLASS_UI_BUILD_TIMEOUT"])
log.info("Found UI build timeout environment variable: {}", timeout)
elif "POETRY_HYPERGLASS_UI_BUILD_TIMEOUT" in os.environ:
timeout = int(os.environ["POETRY_HYPERGLASS_UI_BUILD_TIMEOUT"])
log.info("Found UI build timeout environment variable: {}", timeout) log.info("Found UI build timeout environment variable: {}", timeout)
timeout = int(timeout)
except KeyError:
timeout = 90
ui_dir = Path(__file__).parent.parent / "ui" ui_dir = Path(__file__).parent.parent / "ui"
build_dir = app_path / "static" / "ui" build_dir = app_path / "static" / "ui"