@@ -218,7 +218,6 @@ def _execute( # noqa C901
218218 no_wait = kwds .get ("no_wait" , False ),
219219 start_datetime = start_datetime ,
220220 log = log_contents_str (config ),
221- early_termination = not kwds .get ("no_early_termination" , False ),
222221 )
223222
224223 else :
@@ -252,7 +251,6 @@ def invocation_to_run_response(
252251 no_wait = False ,
253252 start_datetime = None ,
254253 log = None ,
255- early_termination = True ,
256254):
257255 start_datetime = start_datetime or datetime .now ()
258256 invocation_id = invocation ["id" ]
@@ -268,7 +266,6 @@ def invocation_to_run_response(
268266 history_id = history_id ,
269267 user_gi = user_gi ,
270268 polling_backoff = polling_backoff ,
271- early_termination = early_termination ,
272269 )
273270 if final_invocation_state not in ("ok" , "skipped" , "scheduled" ):
274271 msg = f"Failed to run workflow [{ workflow_id } ], at least one job is in [{ final_invocation_state } ] state."
@@ -784,13 +781,13 @@ def _history_id(gi, **kwds) -> str:
784781
785782
786783def wait_for_invocation_and_jobs (
787- ctx , invocation_id : str , history_id : Optional [str ], user_gi : GalaxyInstance , polling_backoff : int , early_termination : bool ,
784+ ctx , invocation_id : str , history_id : Optional [str ], user_gi : GalaxyInstance , polling_backoff : int ,
788785):
789786 polling_tracker = PollingTrackerImpl (polling_backoff )
790787 invocation_api = BioblendInvocationApi (ctx , user_gi )
791788 with WorkflowProgressDisplay (invocation_id ) as workflow_progress_display :
792789 final_invocation_state , job_state , error_message = polling_wait_for_invocation_and_jobs (
793- ctx , invocation_id , invocation_api , polling_tracker , workflow_progress_display , early_termination = early_termination
790+ ctx , invocation_id , invocation_api , polling_tracker , workflow_progress_display ,
794791 )
795792 if error_message :
796793 if not history_id :
@@ -818,7 +815,7 @@ def state_func():
818815 return _wait_on_state (state_func , timeout = timeout )
819816
820817
821- def _wait_on_state (state_func , polling_backoff = 0 , timeout = None , early_termination = True ):
818+ def _wait_on_state (state_func , polling_backoff = 0 , timeout = None ):
822819 def get_state ():
823820 response = state_func ()
824821 if not isinstance (response , list ):
@@ -840,8 +837,6 @@ def get_state():
840837 "cancelled" ,
841838 "failed" ,
842839 ]
843- if not early_termination and current_non_terminal_states :
844- return None
845840 for terminal_state in hierarchical_fail_states :
846841 if terminal_state in current_states :
847842 # If we got here something has failed and we can return (early)
0 commit comments