Skip to content

Commit

Permalink
cache: py2 compatibility, kwargs after named args (PROJQUAY-2101) (#859)
Browse files Browse the repository at this point in the history
Fix compaitbily with the py2 quayio branch. move the kwargs at the
end of the call
  • Loading branch information
syed authored Aug 3, 2021
1 parent 6536305 commit 3dde364
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/cache/redis_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ def __init__(self, primary=None, replica=None):
raise Exception("Missing primary host for Redis model cache configuration")

self.write_client = StrictRedis(
**primary,
socket_connect_timeout=1,
socket_timeout=2,
health_check_interval=2,
**primary,
)

if not replica:
self.read_client = self.write_client
else:
self.read_client = StrictRedis(
**replica,
socket_connect_timeout=1,
socket_timeout=2,
health_check_interval=2,
**replica,
)

def get(self, key, *args, **kwargs):
Expand Down

0 comments on commit 3dde364

Please sign in to comment.