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")
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")