#NEWLINE# def start_working_on_subjob( self , build_id , subjob_id , atomic_commands ) : #NEWLINE# #INDENT# '\n        Begin working on a subjob with the given build id and subjob id. This just starts the subjob execution\n        asynchronously on a separate thread.\n\n        :type build_id: int\n        :type subjob_id: int\n        :type atomic_commands: list[str]\n        :return: The text to return in the API response.\n        :rtype: dict[str, int]\n        ' #NEWLINE# if ( build_id != self . _current_build_id ) : #NEWLINE# #INDENT# raise BadRequestError ( 'Attempted to start subjob {} for build {}, but current build id is {}.' . format ( subjob_id , build_id , self . _current_build_id ) ) #NEWLINE# #UNINDENT# executor = self . _idle_executors . get ( ) #NEWLINE# SafeThread ( target = self . _execute_subjob , args = ( build_id , subjob_id , executor , atomic_commands ) , name = 'Bld{}-Sub{}' . format ( build_id , subjob_id ) ) . start ( ) #NEWLINE# self . _logger . info ( 'Slave ({}:{}) has received subjob. (Build {}, Subjob {})' , self . host , self . port , build_id , executor ) #NEWLINE# return { #NEWLINE# #INDENT# 'executor_id' : executor . id , #NEWLINE# #UNINDENT# }