Skip to content

Use blocking connection pool #54

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

Merged
merged 3 commits into from
Feb 12, 2024

Conversation

stinovlas
Copy link
Contributor

@stinovlas stinovlas commented Feb 7, 2024

Closes #53.

I decided not to add timeout argument at the moment, because any unknown argument passed to constructor is passed to the BlockedConnectionPool (including timeout if user wishes to customize it).

BlockingConnectionPool default is 20 seconds. If you think it's too high, we can still customize that value without changing constructors themselves, like this:

if "timeout" not in connection_kwargs:
    connection_kwargs["timeout"] = 3  # or other sensible default

TODO

  • replace ConnectionPool with BlockingConnectionPool
  • add connection_kwargs (and max connections) to result backends
  • add tests
  • update documentation

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (09e835e) 96.31% compared to head (7cfb6f7) 96.31%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop      #54   +/-   ##
========================================
  Coverage    96.31%   96.31%           
========================================
  Files            7        7           
  Lines          217      217           
========================================
  Hits           209      209           
  Misses           8        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stinovlas stinovlas marked this pull request as ready for review February 8, 2024 08:36
@s3rius s3rius merged commit 0489e6c into taskiq-python:develop Feb 12, 2024
@s3rius
Copy link
Member

s3rius commented Feb 12, 2024

Seems good for me.

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

Successfully merging this pull request may close these issues.

Problem with using max connections limit
3 participants