Commit fe2ddae0 authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

experiments: flush output for slurm so we get intermediate results

parent 5b730885
...@@ -159,16 +159,16 @@ class SimpleComponent(Component): ...@@ -159,16 +159,16 @@ class SimpleComponent(Component):
async def process_out(self, lines, eof): async def process_out(self, lines, eof):
if self.verbose: if self.verbose:
for l in lines: for l in lines:
print(self.label, 'OUT:', lines) print(self.label, 'OUT:', lines, flush=True)
async def process_err(self, lines, eof): async def process_err(self, lines, eof):
if self.verbose: if self.verbose:
for l in lines: for l in lines:
print(self.label, 'ERR:', lines) print(self.label, 'ERR:', lines, flush=True)
async def terminated(self, rc): async def terminated(self, rc):
if self.verbose: if self.verbose:
print(self.label, 'TERMINATED:', rc) print(self.label, 'TERMINATED:', rc, flush=True)
if not self.canfail and rc != 0: if not self.canfail and rc != 0:
raise Exception('Command Failed: ' + str(self.cmd_parts)) raise Exception('Command Failed: ' + str(self.cmd_parts))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment