PaiGram/core/game/__init__.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
472 B
Python
Raw Normal View History

from core.base.redisdb import RedisDB
from core.service import init_service
from .cache import GameCache
from .services import GameMaterialService, GameStrategyService
@init_service
def create_game_strategy_service(redis: RedisDB):
_cache = GameCache(redis, "game:strategy")
return GameStrategyService(_cache)
@init_service
def create_game_material_service(redis: RedisDB):
_cache = GameCache(redis, "game:material")
return GameMaterialService(_cache)