This commit is contained in:
parent
809b980145
commit
658c8c7702
|
@ -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
|
# author not found in the list, so add the new author with the updated stat field
|
||||||
followed_author_followers.append(author)
|
followed_author_followers.append(author)
|
||||||
await redis.execute(
|
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",
|
||||||
"SET",
|
"SET",
|
||||||
f"author:{follower_id}:follows-topics",
|
f"author:{follower_id}:follows-topics",
|
||||||
json.dumps(follower_follows_topics),
|
json.dumps(follower_follows_topics, cls=CustomJSONEncoder),
|
||||||
)
|
)
|
||||||
|
|
||||||
# update topic's stat
|
# update topic's stat
|
||||||
|
|
Loading…
Reference in New Issue
Block a user