fix-async

This commit is contained in:
2022-10-01 13:37:24 +03:00
parent 88b08882bf
commit 420d6c1f2d
2 changed files with 6 additions and 14 deletions

View File

@@ -244,16 +244,6 @@ class ShoutsCache:
print("[zine.cache] indexed by %d authors " % len(shouts_by_author.keys()))
ShoutsCache.by_author = shouts_by_author
@staticmethod
async def get_by_author(author):
async with ShoutsCache.lock:
return ShoutsCache.by_author.get(author, [])
@staticmethod
async def get_by_topic(topic):
async with ShoutsCache.lock:
return ShoutsCache.by_topic.get(topic, [])
@staticmethod
async def get_top_published_before(daysago, offset, limit):
shouts_by_rating = []