Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis-py complains about pool.close and wants pool.aclose #418

Open
ramnes opened this issue Nov 2, 2023 · 1 comment
Open

redis-py complains about pool.close and wants pool.aclose #418

ramnes opened this issue Nov 2, 2023 · 1 comment

Comments

@ramnes
Copy link

ramnes commented Nov 2, 2023

Hey there, thanks for the neat project!

Using Worker.close gives a warning with redis-py >= 5.0.1:

  .venv/lib/python3.10/site-packages/arq/worker.py:846: DeprecationWarning: Call to deprecated close. (Use aclose() instead) -- Deprecated since version 5.0.0.
    await self.pool.close(close_connection_pool=True)

Should be pretty straightforward to fix if older versions of redis-py get dropped, otherwise something like if hastattr(self.pool, "aclose"): self.pool.aclose() should work, I guess.

Happy to follow instructions and make the PR if needed. :)

@Wh1isper
Copy link

We can either upgrade directly when dropping redis v4 support or, as you metioned, trying the new method first👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants