2022-07-31 07:33:56 +00:00
|
|
|
from utils.redisdb import RedisDB
|
2022-08-06 09:27:34 +00:00
|
|
|
from utils.service.manager import listener_service
|
2022-08-31 06:48:15 +00:00
|
|
|
from .cache import GameCache
|
|
|
|
from .services import GameStrategyService, GameMaterialService
|
2022-07-31 07:33:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
@listener_service()
|
|
|
|
def create_game_strategy_service(redis: RedisDB):
|
2022-08-31 06:48:15 +00:00
|
|
|
_cache = GameCache(redis, "game:strategy")
|
|
|
|
return GameStrategyService(_cache)
|
|
|
|
|
|
|
|
|
|
|
|
@listener_service()
|
|
|
|
def create_game_material_service(redis: RedisDB):
|
|
|
|
_cache = GameCache(redis, "game:material")
|
|
|
|
return GameMaterialService(_cache)
|