@@ -25,7 +25,7 @@ def __init__(self, execution_id):
2525
2626 def __str__ (self ):
2727 return 'Result(id={}, stdout={}, stderr={}, returncode={})' .format (
28- self .execution_id , bool ( self .stdout ), bool ( self .stderr ) , self .returncode )
28+ self .execution_id , self .stdout , self .stderr , self .returncode )
2929
3030
3131class Execution :
@@ -39,7 +39,7 @@ def __init__(self, process, execution_id, timeout):
3939
4040 def __str__ (self ):
4141 return 'Result(id={}, stdout={}, stderr={}, returncode={})' .format (
42- self .id , bool ( self .process .stdout ), bool ( self .process .stderr ) , self .process .returncode )
42+ self .id , self .process .stdout , self .process .stderr , self .process .returncode )
4343
4444
4545class Manager :
@@ -71,8 +71,6 @@ def start_subprocess(self, execution_id: int, command: str, environment: dict, t
7171 # all variables must be strings, be explicit so it fail in our code
7272 process_environment [key ] = str (value )
7373
74- logger .info ('Starting execution #%s' , execution_id )
75-
7674 process = subprocess .Popen (command , stdout = subprocess .PIPE , stderr = subprocess .PIPE ,
7775 preexec_fn = os .setpgrp , env = process_environment , shell = True )
7876
@@ -155,14 +153,13 @@ def read_output(self, timeout=0.1) -> typing.List[Result]:
155153 continue # we'll check again later
156154
157155 # we may not have read everything available, so only cleanup after all pipes are closed
158- open_pipes = {execution .process .stdout .raw , execution .process .stderr .raw
159- } & set (self .pipes .keys ())
156+ open_pipes = (
157+ {execution .process .stdout .raw , execution .process .stderr .raw }
158+ & set (self .pipes .keys ())
159+ )
160160 if not open_pipes :
161161 result = all_results .setdefault (execution .id , Result (execution .id ))
162162 result .returncode = execution .process .returncode
163- run_time = time .monotonic () - execution .start_time
164- logger .info ('Execution #%s exited with code %s after %s seconds' ,
165- execution .id , result .returncode , run_time )
166163 del self .running [execution .id ]
167164
168165 return list (all_results .values ())
0 commit comments