Open bstempi opened 7 years ago
Update: This seems to happen if the function that I'm trying to modify is within a class. For example:
class Something(object):
queue = magica_queue()
def setup_consumer(self):
def consume(msg):
print(msg.body)
consumer = yield from queue.consume(consume)
This also fails.
Seems like you missed something in handler declaration (I'm failed with self
when I've got errors in this case). My working code:
async def handle_message(self, message): # it is a handler for other queue in my case
handler = functools.partial(self.app.delivery_handler, queue.name)
await queue.consume(handler)
def delivery_handler(self, queue_name, message):
...
Hi, I have some consumer callback function that looks like this:
Somewhere else, I have something like this:
For whatever reason, the callback is never invoked. If I pass a regular function, it works. It does not seem to work with a partial and I get no exceptions.
Any ideas?