cache top shouts

This commit is contained in:
knst-kotov
2021-09-01 13:28:42 +03:00
parent eba8e6d6af
commit 41413242bd
2 changed files with 62 additions and 30 deletions

View File

@@ -13,7 +13,7 @@ from auth.oauth import oauth_login, oauth_authorize
from auth.email import email_authorize
from redis import redis
from resolvers.base import resolvers
from resolvers.zine import GitTask
from resolvers.zine import GitTask, TopShouts
import asyncio
@@ -28,7 +28,7 @@ middleware = [
async def start_up():
await redis.connect()
git_task = asyncio.create_task(GitTask.git_task_worker())
top_shouts_task = asyncio.create_task(TopShouts.worker())
async def shutdown():
await redis.disconnect()