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

Python: add LASTSAVE command #1509

Merged
merged 1 commit into from
May 31, 2024

Conversation

aaron-congo
Copy link
Collaborator

Issue #, if available:
N/A

Description of changes:
https://redis.io/docs/latest/commands/lastsave/

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aaron-congo aaron-congo requested a review from a team as a code owner May 31, 2024 17:22
@aaron-congo aaron-congo added the python Python wrapper label May 31, 2024
@aaron-congo aaron-congo force-pushed the python/integ_acongo_lastsave branch from bc131d5 to 66e5d5e Compare May 31, 2024 17:26

result = await redis_client.lastsave()
assert isinstance(result, int)
assert result > yesterday_unix_time
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assumes that the last time the database was saved was yesterday? Maybe include a note about this so if this does fail, someone just needs to re-run after running BGSAVE().

@acarbonetto acarbonetto merged commit 0eea46c into valkey-io:main May 31, 2024
6 checks passed
@acarbonetto acarbonetto deleted the python/integ_acongo_lastsave branch May 31, 2024 21:33
cyip10 pushed a commit to Bit-Quill/valkey-glide that referenced this pull request Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Python wrapper
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants