Exemplo n.º 1
0
 def build_federation_sender(self):
     if self.should_send_federation():
         return TransactionQueue(self)
     elif not self.config.worker_app:
         return FederationRemoteSendQueue(self)
     else:
         raise Exception("Workers cannot send federation traffic")
Exemplo n.º 2
0
 def get_federation_sender(self) -> AbstractFederationSender:
     if self.should_send_federation():
         return FederationSender(self)
     elif not self.config.worker_app:
         return FederationRemoteSendQueue(self)
     else:
         raise Exception("Workers cannot send federation traffic")