From 0ed2c53acd278d57a39390fd4db78c5aaf088e0a Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期五, 21 四月 2023 18:03:54 +0800
Subject: [PATCH] 开盘啦数据解析

---
 code_data_util.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/code_data_util.py b/code_data_util.py
index 8233dbb..2e64bd9 100644
--- a/code_data_util.py
+++ b/code_data_util.py
@@ -31,7 +31,7 @@
     @classmethod
     def save(cls, code, val, unit):
         redis = _redisManager.getRedis()
-        redis.setex("zyltgb-{}".format(code), 60 * 60 * 24 * 10,
+        redis.setex("zyltgb-{}".format(code), tool.get_expire(),
                     round(float(val) * 100000000) if int(unit) == 0 else round(
                         float(val) * 10000))
 
@@ -66,4 +66,7 @@
 
 
 if __name__ == "__main__":
-    print(is_same_code_with_price("000617", 17.89))
+    redis = _redisManager.getRedis()
+    keys = redis.keys("zyltgb-*")
+    for key in keys:
+        redis.delete(key)

--
Gitblit v1.8.0