@@ -741,19 +741,15 @@ def on_entered(self, from_state: Optional[process_states.State]) -> None:
741741 call_with_super_check (self .on_killed )
742742
743743 if self ._coordinator and isinstance (self .state , enum .Enum ):
744- # FIXME: this part should be tested first
745- # FIXME: move all to `coordinator.broadcast()` call and in rmq implement coordinator
746- from plumpy .rmq .exceptions import CommunicatorChannelInvalidStateError , CommunicatorConnectionClosed
747-
748744 from_label = cast (enum .Enum , from_state .LABEL ).value if from_state is not None else None
749745 subject = f'state_changed.{ from_label } .{ self .state .value } '
750746 self .logger .info ('Process<%s>: Broadcasting state change: %s' , self .pid , subject )
751747 try :
752748 self ._coordinator .broadcast_send (body = None , sender = self .pid , subject = subject )
753- except ( CommunicatorConnectionClosed , CommunicatorChannelInvalidStateError ) :
749+ except exceptions . CoordinatorConnectionError :
754750 message = 'Process<%s>: no connection available to broadcast state change from %s to %s'
755751 self .logger .warning (message , self .pid , from_label , self .state .value )
756- except concurrent . futures . TimeoutError :
752+ except exceptions . CoordinatorTimeoutError :
757753 message = 'Process<%s>: sending broadcast of state change from %s to %s timed out'
758754 self .logger .warning (message , self .pid , from_label , self .state .value )
759755
0 commit comments