celery / kombu

Messaging library for Python.
http://kombu.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
2.81k stars 920 forks source link

ConnectionPool can't be used after .resize(..., reset=True) #2018

Closed spumer closed 3 weeks ago

spumer commented 4 weeks ago

I close pool and then want to use it again. Reinit.

I found the .resize() method which has option reset. reset=True allow close all available connections and then .setup() will be called, but pool will be closed (._closed=True) and any .acquire() call will raise an error.

https://github.com/celery/kombu/blob/1df567a5e813b9030b858b454e51eb70ea928e6a/kombu/resource.py#L189