Skip to content

Conversation

@CahidArda
Copy link
Collaborator

Adds HEXPIRE command:

# With seconds
redis.hset("myhash", "field1", "value1")
redis.hexpire("myhash", "field1", 5)

assert redis.hget("myhash", "field1") == "value1"

time.sleep(5)

assert redis.hget("myhash", "field1") is None

# With a timedelta
redis.hset("myhash", "field1", "value1")
redis.hexpire("myhash", "field1", datetime.timedelta(seconds=5))

@linear
Copy link

linear bot commented Mar 27, 2025

@CahidArda CahidArda changed the title DX-1720: add HEXPIRE command DX-1780: add HEXPIRE command Mar 27, 2025
@yunusemreozdemir
Copy link
Contributor

Can you make the GitHub action pass? It seems like it is failing from formatting. I usually run these:
poetry run pytest
poetry run ruff format .
poetry run ruff check .
poetry run mypy --show-error-codes .

@CahidArda
Copy link
Collaborator Author

I fixed the formatting issue, but the tests won't pass because hexpire isn't deployed to regional dbs yet

@CahidArda CahidArda merged commit 14432d4 into main Apr 4, 2025
1 check passed
@mdumandag mdumandag deleted the DX-1780-hexpire branch April 11, 2025 13:31
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.

3 participants