make UI build timeout overridable

This commit is contained in:
checktheroads 2020-06-21 17:39:57 -07:00
parent a96772ee88
commit 65734a1e5a

View file

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