-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 support for BZMPOP #1851
Add support for BZMPOP #1851
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same SINTERCARD PR changes.
Codecov Report
@@ Coverage Diff @@
## master #1851 +/- ##
==========================================
- Coverage 93.60% 93.04% -0.56%
==========================================
Files 76 76
Lines 16214 16446 +232
==========================================
+ Hits 15177 15303 +126
- Misses 1037 1143 +106
Continue to review full report at Codecov.
|
redis/commands/core.py
Outdated
def bzmpop( | ||
self, | ||
timeout: float, | ||
num_keys: int, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
num_keys should probably be numkeys - given the help text
redis/commands/core.py
Outdated
""" | ||
args = [timeout, num_keys, *keys] | ||
if (min and max) or (not min and not max): | ||
raise DataError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raise DataError('Either min or max, but not both must be set')```
redis/commands/core.py
Outdated
args.append("MIN") | ||
else: | ||
args.append("MAX") | ||
if count != 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to not extend either way? We can save the cost of this if check - so it's cheaper. Though, it's unclear if there's a default. What does redis-cli say?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In redis-cli if you don't specify the count it will pop 1, so I changhed it to extend either way.
* add bzmpop * add comment * fix pr comment * fix linters * fix pr comments
* add bzmpop * add comment * fix pr comment * fix linters * fix pr comments
* add redis5 and redis4 dockers * redis versions testenv * path changes * fix linters * fix tests * fixing linter * Increased pubsub's wait_for_messages timeout to prevent flaky tests (#1893) * Fixing TypeError in GraphCommands.explain (#1901) * Fixing AttributeError in UnixDomainSocketConnection (#1903) * Fixing AttributeError on some connection errors (#1905) * cluster script fixes to support future cluster versions and redis unstable (#1900) * Fixing LMOVE, BLMOVE returning an incorrect response (#1906) * Raising ConnectionError on invalid ocsp certificates - with status information (#1907) * 4.1.2 (#1904) * adding cluster env timeout time (#1908) * Update changes file with changes since 4.0.0-beta2 (#1915) * Fixing volume for unstable_cluster docker (#1914) * Change json.clear test multi to be up to date with redisjson (#1922) * fix json clear test * fix json clear test * Add support for BZMPOP (#1851) * add bzmpop * add comment * fix pr comment * fix linters * fix pr comments * add client no-evict (#1856) * Add support for ZINTERCARD (#1857) * add zintercard * fix pr comment * linters * Add support for EVAL_RO (#1862) * add sort_ro * mark test as onlynon cluster * delete mark test as onlynoncluster * add eval_ro * fix linters * delete sort_ro * fix pr comment * add type hints * add type hints * linters * Add support for EVALSHA_RO (#1863) * add evalsha-ro * fix pr comment * add type hints * add type hints * Fix naming conventions (#1872) * fix naming convention * fix worng changes * change ports to resolve conflict with unstable_cluster Co-authored-by: Chayim I. Kirshen <c@kirshen.com> Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: Bar Shaul <88437685+barshaul@users.noreply.github.com> Co-authored-by: Varun Chopra <v@chopraaa.com>
* add type hints for json commands * Change json.clear test multi to be up to date with redisjson (#1922) * fix json clear test * fix json clear test * Add support for BZMPOP (#1851) * add bzmpop * add comment * fix pr comment * fix linters * fix pr comments * add client no-evict (#1856) * Add support for ZINTERCARD (#1857) * add zintercard * fix pr comment * linters * Add support for EVAL_RO (#1862) * add sort_ro * mark test as onlynon cluster * delete mark test as onlynoncluster * add eval_ro * fix linters * delete sort_ro * fix pr comment * add type hints * add type hints * linters * Add support for EVALSHA_RO (#1863) * add evalsha-ro * fix pr comment * add type hints * add type hints * Fix naming conventions (#1872) * fix naming convention * fix worng changes * fix naming convention in rootPath
* add redis5 and redis4 dockers * redis versions testenv * path changes * fix linters * fix tests * fixing linter * Increased pubsub's wait_for_messages timeout to prevent flaky tests (#1893) * Fixing TypeError in GraphCommands.explain (#1901) * Fixing AttributeError in UnixDomainSocketConnection (#1903) * Fixing AttributeError on some connection errors (#1905) * cluster script fixes to support future cluster versions and redis unstable (#1900) * Fixing LMOVE, BLMOVE returning an incorrect response (#1906) * Raising ConnectionError on invalid ocsp certificates - with status information (#1907) * 4.1.2 (#1904) * adding cluster env timeout time (#1908) * Update changes file with changes since 4.0.0-beta2 (#1915) * Fixing volume for unstable_cluster docker (#1914) * Change json.clear test multi to be up to date with redisjson (#1922) * fix json clear test * fix json clear test * Add support for BZMPOP (#1851) * add bzmpop * add comment * fix pr comment * fix linters * fix pr comments * add client no-evict (#1856) * Add support for ZINTERCARD (#1857) * add zintercard * fix pr comment * linters * Add support for EVAL_RO (#1862) * add sort_ro * mark test as onlynon cluster * delete mark test as onlynoncluster * add eval_ro * fix linters * delete sort_ro * fix pr comment * add type hints * add type hints * linters * Add support for EVALSHA_RO (#1863) * add evalsha-ro * fix pr comment * add type hints * add type hints * Fix naming conventions (#1872) * fix naming convention * fix worng changes * change ports to resolve conflict with unstable_cluster Co-authored-by: Chayim I. Kirshen <c@kirshen.com> Co-authored-by: Chayim <chayim@users.noreply.github.com> Co-authored-by: Bar Shaul <88437685+barshaul@users.noreply.github.com> Co-authored-by: Varun Chopra <v@chopraaa.com> (cherry picked from commit 0d26117)
Pull Request check-list
Please make sure to review and check all of these items:
$ tox
pass with this change (including linting)?NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.
Description of change
closes #1800