From ba52d7ac92a36f413eacaa686f8535e859664ec6 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期一, 28 八月 2023 09:45:11 +0800 Subject: [PATCH] bug修改 --- l2_data_util.py | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/l2_data_util.py b/l2_data_util.py index 2755eac..545ef7e 100644 --- a/l2_data_util.py +++ b/l2_data_util.py @@ -7,7 +7,7 @@ import json import time -from db.redis_manager import RedisUtils +from db.redis_manager_delegate import RedisUtils from utils.tool import async_call from l2 import l2_data_manager @@ -179,8 +179,7 @@ if abs(get_time_as_seconds(time_str) - get_time_as_seconds(time_)) > 3: continue if same_time_nums[time_] > 20: - redis = l2_data_manager._redisManager.getRedis() - RedisUtils.setex(redis, "big_data-{}-{}".format(code, int(round(time.time() * 1000))), tool.get_expire(), + RedisUtils.setex(l2_data_manager._redisManager.getRedis(), "big_data-{}-{}".format(code, int(round(time.time() * 1000))), tool.get_expire(), d1) break @@ -189,14 +188,12 @@ # TODO 娴嬭瘯鏁版嵁 # @async_call def save_l2_latest_data_number(code, num): - redis = l2_data_manager._redisManager.getRedis() - RedisUtils.setex(redis, "l2_latest_data_num-{}".format(code), 3, num) + RedisUtils.setex(l2_data_manager._redisManager.getRedis(), "l2_latest_data_num-{}".format(code), 3, num) # 鑾峰彇鏈�鏂版暟鎹潯鏁� def get_l2_latest_data_number(code): - redis = l2_data_manager._redisManager.getRedis() - num =RedisUtils.get(redis, "l2_latest_data_num-{}".format(code)) + num =RedisUtils.get(l2_data_manager._redisManager.getRedis(), "l2_latest_data_num-{}".format(code)) if num is not None: return int(num) return None -- Gitblit v1.8.0