@@ -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."
@@ -781,13 +778,13 @@ def _history_id(gi, **kwds) -> str:
781778
782779
783780def wait_for_invocation_and_jobs (
784- ctx , invocation_id : str , history_id : Optional [str ], user_gi : GalaxyInstance , polling_backoff : int , early_termination : bool ,
781+ ctx , invocation_id : str , history_id : Optional [str ], user_gi : GalaxyInstance , polling_backoff : int ,
785782):
786783 polling_tracker = PollingTrackerImpl (polling_backoff )
787784 invocation_api = BioblendInvocationApi (ctx , user_gi )
788785 with WorkflowProgressDisplay (invocation_id ) as workflow_progress_display :
789786 final_invocation_state , job_state , error_message = polling_wait_for_invocation_and_jobs (
790- ctx , invocation_id , invocation_api , polling_tracker , workflow_progress_display , early_termination = early_termination
787+ ctx , invocation_id , invocation_api , polling_tracker , workflow_progress_display ,
791788 )
792789 if error_message :
793790 if not history_id :
@@ -815,7 +812,7 @@ def state_func():
815812 return _wait_on_state (state_func , timeout = timeout )
816813
817814
818- def _wait_on_state (state_func , polling_backoff = 0 , timeout = None , early_termination = True ):
815+ def _wait_on_state (state_func , polling_backoff = 0 , timeout = None ):
819816 def get_state ():
820817 response = state_func ()
821818 if not isinstance (response , list ):
@@ -837,8 +834,6 @@ def get_state():
837834 "cancelled" ,
838835 "failed" ,
839836 ]
840- if not early_termination and current_non_terminal_states :
841- return None
842837 for terminal_state in hierarchical_fail_states :
843838 if terminal_state in current_states :
844839 # If we got here something has failed and we can return (early)
0 commit comments