Skip to content

Commit

Permalink
Update redisDB.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zefanjajobse authored Dec 28, 2022
1 parent b3364e8 commit ac69f7b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions battlefield/api/redisDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@

def redis_connect() -> redis.client.Redis:
try:
client = redis.Redis(
client = redis.RedisCluster(
host=redishost,
port=redisport,
password=redispass,
db=0,
socket_timeout=5,
)
ping = client.ping()
Expand All @@ -37,4 +36,4 @@ async def set_routes_to_cache(key: str, value: str, ttl: int = 600) -> bool:
"""Data to redis, default == 10 minutes"""

state = client.setex(key, timedelta(seconds=ttl), value=value)
return state
return state

0 comments on commit ac69f7b

Please sign in to comment.