revalidation-fix
All checks were successful
Deploy on push / deploy (push) Successful in 6s

This commit is contained in:
Untone 2024-11-02 11:56:47 +03:00
parent d4548f71c7
commit 09a6d085fd

View File

@ -1,6 +1,7 @@
import asyncio
from cache.cache import cache_author, cache_topic, get_cached_author, get_cached_topic
from resolvers.stat import get_with_stat
from utils.logger import root_logger as logger
@ -32,7 +33,7 @@ class CacheRevalidationManager:
async with self.lock:
# Ревалидация кэша авторов
for author_id in self.items_to_revalidate["authors"]:
author = await get_cached_author(author_id)
author = await get_cached_author(author_id, get_with_stat)
if author:
await cache_author(author)
self.items_to_revalidate["authors"].clear()