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