From 4dfa8659f0f905375e691b987920966e27d6551d Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期二, 08 八月 2023 11:30:12 +0800 Subject: [PATCH] L2LimitUpSellStatisticUtil单例+缓存改造 --- code_attribute/limit_up_time_manager.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/code_attribute/limit_up_time_manager.py b/code_attribute/limit_up_time_manager.py index 15e9f04..25cd138 100644 --- a/code_attribute/limit_up_time_manager.py +++ b/code_attribute/limit_up_time_manager.py @@ -9,6 +9,7 @@ class LimitUpTimeManager: __limit_up_time_cache = {} + __db = 0 _redisManager = redis_manager.RedisManager(0) __instance = None @@ -37,7 +38,7 @@ global_util.limit_up_time[code] = time tool.CodeDataCacheUtil.set_cache(self.__limit_up_time_cache, code, time) RedisUtils.setex_async( - self._redisManager.getRedis(), "limit_up_time-{}".format(code), tool.get_expire(), time) + self.__db, "limit_up_time-{}".format(code), tool.get_expire(), time) def get_limit_up_time(self, code): time = global_util.limit_up_time.get(code) -- Gitblit v1.8.0