From 58a0f47d761719baf5fb48b17647f29ed642ed2c Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期二, 29 八月 2023 12:20:25 +0800 Subject: [PATCH] L1目标代码增加到200个数据 --- code_attribute/gpcode_first_screen_manager.py | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/code_attribute/gpcode_first_screen_manager.py b/code_attribute/gpcode_first_screen_manager.py index 71a7f53..c56e69c 100644 --- a/code_attribute/gpcode_first_screen_manager.py +++ b/code_attribute/gpcode_first_screen_manager.py @@ -5,9 +5,9 @@ # 璁剧疆棣栨澘鏈瓫閫夌殑鐩爣绁� import json -from db.redis_manager import RedisUtils +from db.redis_manager_delegate import RedisUtils from utils import tool -from db import redis_manager +from db import redis_manager_delegate as redis_manager from third_data import block_info __redisManager = redis_manager.RedisManager(0) @@ -56,7 +56,7 @@ RedisUtils.sadd(redis, "first_no_screen_codes", code, auto_free=False) RedisUtils.expire(redis, "first_no_screen_codes", tool.get_expire(), auto_free=False) finally: - redis.connection_pool.disconnect() + RedisUtils.realse(redis) def clear_first_no_screen_codes(): @@ -70,7 +70,7 @@ for code in codes: RedisUtils.srem(redis, "first_no_screen_codes", code, auto_free= False) finally: - redis.connection_pool.disconnect() + RedisUtils.realse(redis) def __get_first_no_screen_codes(): @@ -152,7 +152,6 @@ return True, "鐐告澘鍚庯紝60鍒嗛挓鍐呴兘鏈洖灏�" if now_rate <= 6: return True, "鐐告澘鍚庯紝娑ㄥ箙灏忎簬6%" - # TODO 鏄惁鏈夊悓姒傚康鐨勭エ宸茬粡涔板叆鎴愬姛 blocks = block_info.get_code_blocks(code) if blocks and len(blocks) == 1: codes = block_info.get_block_codes(blocks[0]) -- Gitblit v1.8.0