revalidate-stat
All checks were successful
Deploy on push / deploy (push) Successful in 21s

This commit is contained in:
Untone 2024-03-28 19:39:10 +03:00
parent 77440388d3
commit 1f012ae5c9

View File

@ -70,7 +70,10 @@ async def get_author(_, _info, slug='', author_id=None):
if cache and isinstance(cache, str):
author_dict = json.loads(cache)
logger.debug(f'got cached author {cache_key} -> {author_dict}')
else:
if not author_dict.get('stat'):
cache = ''
logger.warn(f'author {author_id} stat updating')
if not cache:
[author] = await get_authors_with_stat_cached(author_query)
if not author or not author.stat:
[author] = get_with_stat(author_query)