You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have some consumer callback function that looks like this:
def consume(msg, something_extra):
print('Message: {}, extra context: {}'.format(msg.body, something_extra))
Somewhere else, I have something like this:
consumer_partial = functools.partial(consume, something_extra='xyz')
consumer = yield from queue.consume(consumer_partial)
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?
The text was updated successfully, but these errors were encountered:
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)
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?
The text was updated successfully, but these errors were encountered: