core/services/search.py
2022-10-04 12:25:59 +03:00

18 lines
389 B
Python

import asyncio
from orm.shout import Shout
class SearchService:
lock = asyncio.Lock()
cache = {}
@staticmethod
async def init(session):
async with SearchService.lock:
SearchService.cache = {}
@staticmethod
async def search(text) -> [Shout]:
async with SearchService.lock:
return [] # TODO: implement getting shouts list