From 5caa2d1f8c1c09b53ff6296ccaf16ab5e625c8c8 Mon Sep 17 00:00:00 2001 From: Untone Date: Mon, 6 May 2024 12:41:53 +0300 Subject: [PATCH] followers-cache-debug --- resolvers/author.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resolvers/author.py b/resolvers/author.py index 178073a8..5cd53ee1 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -308,12 +308,12 @@ async def get_author_followers(_, _info, slug: str): author_id = author.id cached = await redis.execute("GET", f"author:{author_id}:followers") if cached: - logger.debug(f"@{slug} got followers cached") followers_ids = [] followers = [] if isinstance(cached, str): followers_cached = json.loads(cached) if isinstance(followers_cached, list): + logger.debug(f"@{slug} got {len(followers_cached)} followers cached") for fc in followers_cached: if fc['id'] not in followers_ids: followers.append(fc)