linebuffer

This commit is contained in:
Charlotte 🦝 Delenk 2024-12-01 15:47:38 +01:00
parent 5cf0bf91c0
commit 1ef23e9750
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122

View file

@ -45,7 +45,7 @@ if len(inputs_to_copy) != 0:
subprocess.run(["@nix@", "copy"] + list(inputs_to_copy) + ["--to", "ssh://build-rainbow-resort", "--no-check-sigs"], check=True, stdout=subprocess.DEVNULL)
# Evaluate on target
result = subprocess.run(["@ssh@", "build-rainbow-resort", "nix-eval-jobs"] + list(map(shlex.quote, remote_args)), check=True, stdout=subprocess.PIPE, text=True)
result = subprocess.Popen(["@ssh@", "build-rainbow-resort", "nix-eval-jobs"] + list(map(shlex.quote, remote_args)), bufsize=1, stdout=subprocess.PIPE, text=True)
for line in iter(result.stdout.readline, ""):
try:
@ -59,4 +59,6 @@ for line in iter(result.stdout.readline, ""):
# Now we are done with this job, we can tell hydra about it
print(line)
except Exception as e:
print(e, file=sys.stderr)
print(e, file=sys.stderr)
sys.exit(result.wait())