#NEWLINE# def build_minion_pb_solver( task , stm_queue = None , solver_id = None ) : #NEWLINE# #INDENT# input_path = task . support_paths . get ( 'minion' ) #NEWLINE# if ( input_path is None ) : #NEWLINE# #INDENT# ( fd , input_path ) = tempfile . mkstemp ( suffix = '.minion' ) #NEWLINE# task . support_paths [ 'minion' ] = input_path #NEWLINE# with os . fdopen ( fd , 'w' ) as input_file : #NEWLINE# #INDENT# write_minion_from_pb ( task . opb , input_file ) #NEWLINE# #UNINDENT# logger . info ( 'wrote minion input file to %s' , input_path ) #NEWLINE# #UNINDENT# def parse( stdout ) : #NEWLINE# #INDENT# return parse_minion ( task . opb , stdout ) #NEWLINE# #UNINDENT# return borg . solver_io . RunningSolver ( parse , [ '{root}/minion-0.12/bin/minion' , '-noresume' , '{task}' ] , input_path , stm_queue = stm_queue , solver_id = solver_id )