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

add queue_class to REDIS_ALLOWED_KEYS #2577

Merged
merged 4 commits into from
Mar 16, 2023

Conversation

zakaf
Copy link
Contributor

@zakaf zakaf commented Feb 6, 2023

Pull Request check-list

Please make sure to review and check all of these items:

  • Does $ tox pass with this change (including linting)?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

Please provide a description of the change here.

#2547 has added support for custom connection pool in RedisCluster, but RedisCluster doesn't allow custom queue_class to be used in BlockingConnectionPool.

This PR adds support for custom queue_class that can be used in BlockingConnectionPool

reference to queue_class in BlockingConnectionPool:

redis-py/redis/connection.py

Lines 1555 to 1570 in 428d609

def __init__(
self,
max_connections=50,
timeout=20,
connection_class=Connection,
queue_class=LifoQueue,
**connection_kwargs,
):
self.queue_class = queue_class
self.timeout = timeout
super().__init__(
connection_class=connection_class,
max_connections=max_connections,
**connection_kwargs,
)

@codecov-commenter
Copy link

codecov-commenter commented Feb 6, 2023

Codecov Report

Patch coverage: 40.00% and project coverage change: -14.63 ⚠️

Comparison is base (25e85e5) 92.29% compared to head (d01a860) 77.66%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2577       +/-   ##
===========================================
- Coverage   92.29%   77.66%   -14.63%     
===========================================
  Files         115      115               
  Lines       29763    28867      -896     
===========================================
- Hits        27469    22419     -5050     
- Misses       2294     6448     +4154     
Impacted Files Coverage Δ
redis/cluster.py 18.70% <ø> (-71.72%) ⬇️
tests/test_cluster.py 14.36% <40.00%> (-82.40%) ⬇️

... and 69 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dvora-h dvora-h added the feature New feature label Mar 16, 2023
@dvora-h dvora-h merged commit d63313b into redis:master Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants