-
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 EXPIREAT command's options #2024
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2024 +/- ##
==========================================
- Coverage 92.17% 92.06% -0.12%
==========================================
Files 100 100
Lines 21024 21063 +39
==========================================
+ Hits 19379 19391 +12
- Misses 1645 1672 +27
Continue to review full report at Codecov.
|
redis/commands/core.py
Outdated
@@ -1501,16 +1501,28 @@ def expire(self, name: KeyT, time: ExpiryT) -> ResponseT: | |||
time = int(time.total_seconds()) | |||
return self.execute_command("EXPIRE", name, time) | |||
|
|||
def expireat(self, name: KeyT, when: AbsExpiryT) -> ResponseT: | |||
def expireat(self, name: KeyT, when: AbsExpiryT, option: str = None) -> ResponseT: |
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.
@dogukanteber WDYT about making these options (NX, XX, etc) variables in the function header. IMHO it would watch our other functions.
@dogukanteber I just pushed a small fix (I hope you don't mind!) so the options will be consistent with options in other functions (like set etc.), now it's ready and we'll include it in the next release, thank you! |
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 #1950