@@ -1239,25 +1239,9 @@ def kill(self, msg_text: Optional[str] = None, force_kill=False) -> Union[bool,
12391239 return False
12401240
12411241 if self ._killing :
1242- # return self._killing
12431242 self ._killing .cancel ()
12441243
12451244 if force_kill :
1246- ## TODO(from alex) this code is just copied from last PR, need to check it
1247- ## It looks mergable with the code below but I dunnot fully understand yet
1248- ## Skip interrupting the state and go straight to killed
1249- #interrupt_exception = process_states.KillInterruption(msg_text, force_kill)
1250- ## XXX: this line was not in ali's PR but to make the change align with _stepping,
1251- ## it seems it is needed to set the _interrupt_action to be used line after.
1252- ## Requires more check to test with aiida-core's PR.
1253- ##
1254- #self._set_interrupt_action_from_exception(interrupt_exception)
1255- ##
1256- #self._killing = self._interrupt_action
1257- #self._state.interrupt(interrupt_exception)
1258-
1259- #breakpoint()
1260- # loop should be immediately shutdown
12611245 msg = MessageBuilder .kill (msg_text , force_kill = force_kill )
12621246 new_state = self ._create_state_instance (process_states .ProcessState .KILLED , msg = msg )
12631247 self .transition_to (new_state )
@@ -1270,7 +1254,6 @@ def kill(self, msg_text: Optional[str] = None, force_kill=False) -> Union[bool,
12701254 self ._set_interrupt_action_from_exception (interrupt_exception )
12711255 self ._killing = self ._interrupt_action
12721256 self ._state .interrupt (interrupt_exception )
1273- #breakpoint()
12741257 return cast (futures .CancellableAction , self ._interrupt_action )
12751258
12761259 msg = MessageBuilder .kill (text = msg_text , force_kill = force_kill )
0 commit comments