mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-16 12:51:45 +00:00
✨ 添加 cookie
和 game
服务的初始化过程
This commit is contained in:
parent
20726081f4
commit
9c2991e137
@ -0,0 +1,11 @@
|
|||||||
|
from app.cookies.repositories import CookiesRepository
|
||||||
|
from app.cookies.service import CookiesService
|
||||||
|
from utils.app.manager import listener_service
|
||||||
|
from utils.mysql import MySQL
|
||||||
|
|
||||||
|
|
||||||
|
@listener_service()
|
||||||
|
def create_cookie_service(mysql: MySQL):
|
||||||
|
_repository = CookiesRepository(mysql)
|
||||||
|
_service = CookiesService(_repository, _cache)
|
||||||
|
return _service
|
@ -0,0 +1,11 @@
|
|||||||
|
from app.game.cache import GameStrategyCache
|
||||||
|
from app.game.service import GameStrategyService
|
||||||
|
from utils.app.manager import listener_service
|
||||||
|
from utils.redisdb import RedisDB
|
||||||
|
|
||||||
|
|
||||||
|
@listener_service()
|
||||||
|
def create_game_strategy_service(redis: RedisDB):
|
||||||
|
_cache = GameStrategyCache(redis)
|
||||||
|
_service = GameStrategyService(_cache)
|
||||||
|
return _service
|
Loading…
Reference in New Issue
Block a user