search dummy service

This commit is contained in:
2022-10-04 03:32:29 +03:00
parent e16265a0c3
commit d678729ffc
3 changed files with 30 additions and 18 deletions

19
services/search.py Normal file
View File

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