precache-аix2

This commit is contained in:
Untone 2024-08-07 11:56:13 +03:00
parent 2a21decc94
commit ebec80f198

2
cache/precache.py vendored
View File

@ -87,7 +87,7 @@ async def precache_data():
topic_dict = topic.dict() if hasattr(topic, "dict") else topic topic_dict = topic.dict() if hasattr(topic, "dict") else topic
await cache_topic(topic_dict) await cache_topic(topic_dict)
await asyncio.gather( await asyncio.gather(
precache_topics_followers(topic["id"], session), precache_topics_authors(topic_dict["id"], session) precache_topics_followers(topic_dict["id"], session), precache_topics_authors(topic_dict["id"], session)
) )
logger.info(f"{len(topics)} topics and their followings precached") logger.info(f"{len(topics)} topics and their followings precached")