core/services/main.py

14 lines
449 B
Python
Raw Normal View History

2022-10-04 00:32:29 +00:00
from services.search import SearchService
2023-10-05 18:46:18 +00:00
from stat.viewed import ViewedStorage
from services.db import local_session
async def storages_init():
with local_session() as session:
2023-10-05 18:46:18 +00:00
print("[main] initialize SearchService")
2022-10-04 12:07:41 +00:00
await SearchService.init(session)
2023-10-05 18:46:18 +00:00
print("[main] SearchService initialized")
print("[main] initialize storages")
2022-11-21 22:23:16 +00:00
await ViewedStorage.init()
2023-10-05 18:46:18 +00:00
print("[main] storages initialized")