#NEWLINE# def enqueue_free_experiment( self , lab_coordaddress , reservation_id , lab_session_id , experiment_instance_id ) : #NEWLINE# #INDENT# self . times -= 1 #NEWLINE# if ( self . times == 0 ) : #NEWLINE# #INDENT# experiment_response = json . dumps ( { #NEWLINE# #INDENT# AbstractCoordinator . FINISH_FINISHED_MESSAGE : True , #NEWLINE# AbstractCoordinator . FINISH_DATA_MESSAGE : 'final response' , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# experiment_response = json . dumps ( { #NEWLINE# #INDENT# AbstractCoordinator . FINISH_FINISHED_MESSAGE : False , #NEWLINE# AbstractCoordinator . FINISH_ASK_AGAIN_MESSAGE : SLOW_CONFIRMER_TIME , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# if ( lab_session_id is not None ) : #NEWLINE# #INDENT# self . uses_free . append ( ( lab_coordaddress , reservation_id , lab_session_id , experiment_instance_id ) ) #NEWLINE# #UNINDENT# initial_time = end_time = datetime . datetime . now ( ) #NEWLINE# self . coordinator . confirm_resource_disposal ( lab_coordaddress , reservation_id , lab_session_id , experiment_instance_id , experiment_response , initial_time , end_time )