PamGram/core/admin/__init__.py

15 lines
463 B
Python
Raw Normal View History

2022-07-26 10:07:31 +00:00
from utils.mysql import MySQL
from utils.redisdb import RedisDB
from utils.service.manager import listener_service
2022-08-05 11:14:29 +00:00
from .cache import BotAdminCache
from .repositories import BotAdminRepository
from .services import BotAdminService
2022-07-26 10:07:31 +00:00
@listener_service()
def create_bot_admin_service(mysql: MySQL, redis: RedisDB):
_cache = BotAdminCache(redis)
_repository = BotAdminRepository(mysql)
_service = BotAdminService(_repository, _cache)
return _service