followers-cache-fix
All checks were successful
Deploy on push / deploy (push) Successful in 25s

This commit is contained in:
Untone 2024-05-06 20:30:49 +03:00
parent 809b980145
commit 658c8c7702

View File

@ -64,7 +64,10 @@ async def cache_author(author: dict):
# author not found in the list, so add the new author with the updated stat field
followed_author_followers.append(author)
await redis.execute(
"SET", f"author:{author_id}:followers", followed_author_followers
"SET", f"author:{author_id}:followers", json.dumps(
followed_author_followers,
cls=CustomJSONEncoder
)
)
@ -157,7 +160,7 @@ async def cache_topic(topic_dict: dict):
"SET",
"SET",
f"author:{follower_id}:follows-topics",
json.dumps(follower_follows_topics),
json.dumps(follower_follows_topics, cls=CustomJSONEncoder),
)
# update topic's stat