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

Remove duplicated functions from redis.py #1142

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions artcommon/artcommonlib/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,6 @@ def get_value_sync(conn: redis.client.Redis, key: str):
return value


@handle_connection_sync
def get_value_sync(conn: redis.client.Redis, key: str):
"""
Same as get_value(), but synchronous
"""

value = conn.get(key)
logger.debug('Key %s has value %s', key, value)
return value


@handle_connection
async def set_value(conn: redis.asyncio.client.Redis, key: str, value):
"""
Expand Down Expand Up @@ -139,17 +128,6 @@ def get_keys_sync(conn: redis.client.Redis, pattern: str):
return keys


@handle_connection_sync
def get_keys_sync(conn: redis.client.Redis, pattern: str):
"""
Same as get_keys(), but synchronous
"""

keys = conn.keys(pattern)
logger.debug('Found keys matching pattern %s: %s', pattern, ', '.join(keys))
return keys


@handle_connection
async def delete_key(conn: redis.asyncio.client.Redis, key: str) -> int:
"""
Expand Down