following-cache-anyway-found
All checks were successful
Deploy on push / deploy (push) Successful in 27s
All checks were successful
Deploy on push / deploy (push) Successful in 27s
This commit is contained in:
@@ -149,7 +149,8 @@ async def cache_topic(topic_dict: dict):
|
||||
# topic not found in the list, so add the new topic with the updated stat field
|
||||
follower_follows_topics.append(topic_dict)
|
||||
|
||||
await redis.execute('SET',
|
||||
await redis.execute(
|
||||
"SET",
|
||||
"SET",
|
||||
f"author:{follower_id}:follows-topics",
|
||||
json.dumps(follower_follows_topics),
|
||||
|
@@ -116,28 +116,28 @@ def after_author_update(_mapper, _connection, author: Author):
|
||||
def after_topic_follower_insert(_mapper, _connection, target: TopicFollower):
|
||||
logger.info(target)
|
||||
asyncio.create_task(
|
||||
handle_topic_follower_change(target.topic, target.follower, True) # type: ignore
|
||||
handle_topic_follower_change(target.topic, target.follower, True) # type: ignore
|
||||
)
|
||||
|
||||
|
||||
def after_topic_follower_delete(_mapper, _connection, target: TopicFollower):
|
||||
logger.info(target)
|
||||
asyncio.create_task(
|
||||
handle_topic_follower_change(target.topic, target.follower, False) # type: ignore
|
||||
handle_topic_follower_change(target.topic, target.follower, False) # type: ignore
|
||||
)
|
||||
|
||||
|
||||
def after_author_follower_insert(_mapper, _connection, target: AuthorFollower):
|
||||
logger.info(target)
|
||||
asyncio.create_task(
|
||||
handle_author_follower_change(target.author, target.follower, True) # type: ignore
|
||||
handle_author_follower_change(target.author, target.follower, True) # type: ignore
|
||||
)
|
||||
|
||||
|
||||
def after_author_follower_delete(_mapper, _connection, target: AuthorFollower):
|
||||
logger.info(target)
|
||||
asyncio.create_task(
|
||||
handle_author_follower_change(target.author, target.follower, False) # type: ignore
|
||||
handle_author_follower_change(target.author, target.follower, False) # type: ignore
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user