Added newlines against buffering
This commit is contained in:
parent
2bbed10117
commit
d25c3a0940
@ -36,7 +36,7 @@ def setup_app() -> FastAPI:
|
||||
app.add_exception_handler(
|
||||
utils.NixBuildException, utils.nix_build_exception_handler
|
||||
)
|
||||
|
||||
|
||||
app.mount("/static", StaticFiles(directory=asset_path()), name="static")
|
||||
|
||||
for route in app.routes:
|
||||
|
@ -54,7 +54,7 @@ class CmdState:
|
||||
line = line.strip("\n")
|
||||
self.stderr.append(line)
|
||||
self.log.debug("stderr: %s", line)
|
||||
self._output.put(line)
|
||||
self._output.put(line + '\n')
|
||||
|
||||
if self.p.stdout in rlist:
|
||||
assert self.p.stdout is not None
|
||||
@ -63,7 +63,7 @@ class CmdState:
|
||||
line = line.strip("\n")
|
||||
self.stdout.append(line)
|
||||
self.log.debug("stdout: %s", line)
|
||||
self._output.put(line)
|
||||
self._output.put(line + '\n')
|
||||
|
||||
if self.p.returncode != 0:
|
||||
raise RuntimeError(f"Failed to run command: {shlex.join(cmd)}")
|
||||
@ -109,9 +109,9 @@ class BaseTask(threading.Thread):
|
||||
break
|
||||
if proc.done:
|
||||
for line in proc.stderr:
|
||||
yield line
|
||||
yield line + '\n'
|
||||
for line in proc.stdout:
|
||||
yield line
|
||||
yield line + '\n'
|
||||
continue
|
||||
while True:
|
||||
out = proc._output
|
||||
|
Loading…
Reference in New Issue
Block a user