def __set_game(game): """ Stores the game. :param game: The game to store :type game: Game """ assert isinstance(game, Game) # Store the game for 30 days RedisUtil.set(GameAService.__GAME_DETAILS_REDIS_KEY % game.game_id, game, 60 * 60 * 24 * 30)
def __set_available_game_ids(game_ids): """ Sets the available games :param game_ids: The list of game ids :type game_ids: list :precondition: all(isinstance(r, str) for r in game_ids) """ assert isinstance(game_ids, list) assert all(isinstance(r, str) for r in game_ids) RedisUtil.set(GameAService.__AVAILABLE_GAME_IDS_REDIS_KEY, game_ids)