diff --git a/app/burnin/stages.py b/app/burnin/stages.py index 15ad3ca..c657368 100644 --- a/app/burnin/stages.py +++ b/app/burnin/stages.py @@ -124,11 +124,11 @@ def _build_badblocks_cmd(devname: str) -> str: f"-p {settings.surface_validate_passes} " f"/dev/{devname} 2>&1" ) - # The outer pipeline lets tr translate \\b → \\n. Single quotes - # around the inner script prevent the host shell from interpreting - # $$. The tr argument uses $'\\b' / $'\\n' escapes — POSIX shells - # interpret these as the literal backspace and newline bytes. - return f"sh -c '{inner}' | tr '\\b' '\\n'" + # The outer pipeline lets tr translate \\b → \\n. stdbuf -oL forces + # tr's stdout to line-buffered mode; without it tr's stdout is + # block-buffered (4 KB chunks) when its destination is a pipe, + # which delays each progress line by ~6 minutes at our throughput. + return f"sh -c '{inner}' | stdbuf -oL tr '\\b' '\\n'" from . import kill from ._common import ( diff --git a/app/config.py b/app/config.py index df93830..351ee4a 100644 --- a/app/config.py +++ b/app/config.py @@ -86,7 +86,7 @@ class Settings(BaseSettings): ssh_key: str = "" # PEM private key content (paste full key including headers) # Application version — used by the /api/v1/updates/check endpoint - app_version: str = "1.0.0-57" + app_version: str = "1.0.0-58" # ---- Authentication (1.0.0-22) ---- # session_secret: HMAC key for signing session cookies. Empty = generate