def make_exchange(self, name): task = asyncio.ensure_future(self.channel.declare_exchange( name, 'fanout', durable=True, auto_delete=False, internal=False), loop=self.loop) self.tick() self.server.send_method(self.channel.id, spec.ExchangeDeclareOK()) return task.result()
def when_the_reply_arrives(self): self.server.send_method(self.channel.id, spec.ExchangeDeclareOK()) self.result = self.task.result()
def when_the_exchange_declare_ok_arrives(self): self.server.send_method(self.channel.id, spec.ExchangeDeclareOK())