mosquito / aio-pika

AMQP 0.9 client designed for asyncio and humans.
https://aio-pika.readthedocs.org/
Apache License 2.0
1.18k stars 186 forks source link

Prevent "Task exception was never retrieved" on timeout #492

Closed torarvid closed 1 year ago

torarvid commented 1 year ago

Sometimes we have an issue with RabbitMQ in production, and we see a lot of these types of errors:

image

This appears to be caused by some task objects that are missing a done_callback. This in turn could cause exceptions to be swallowed, I think.

I wonder if something like this could fix it.

torarvid commented 1 year ago

Thanks for the helpful comments, @decaz. I tried implementing both suggestions in https://github.com/mosquito/aio-pika/pull/492/commits/30c8c4f905b70b07601256b4443d4ec44fc30c24.

mosquito commented 1 year ago

@torarvid please fix the linter warnings

torarvid commented 1 year ago

@mosquito I think that fixed the linter error. Is it customary that I squash the commits before you merge, or will you just do that? What do you prefer? 😊

mosquito commented 1 year ago

Released as 8.2.2