profiling-db
Some checks failed
Deploy to core / deploy (push) Failing after 2m5s

This commit is contained in:
2024-02-21 17:55:54 +03:00
parent e69046a1f8
commit be9f62eb76
5 changed files with 56 additions and 28 deletions

View File

@@ -132,14 +132,14 @@ def query_follows(user_id: str):
async def get_follows_by_user_id(user_id: str):
if user_id:
redis_key = f"user:{user_id}:follows"
res = await redis.execute('GET', redis_key)
res = await redis.execute("GET", redis_key)
if isinstance(res, str):
follows = json.loads(res)
return follows
logger.debug(f"getting follows for {user_id}")
follows = query_follows(user_id)
await redis.execute('SET', redis_key, json.dumps(follows))
await redis.execute("SET", redis_key, json.dumps(follows))
return follows