From 783f6b0c18272b7f9ee988664c4194ecc80e23a7 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 03 八月 2023 14:21:45 +0800 Subject: [PATCH] redis上级缓存添加 --- third_data/code_plate_key_manager.py | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/third_data/code_plate_key_manager.py b/third_data/code_plate_key_manager.py index 3438b09..af183d4 100644 --- a/third_data/code_plate_key_manager.py +++ b/third_data/code_plate_key_manager.py @@ -408,7 +408,7 @@ # 娑ㄥ仠鍒楄〃涓尮閰嶅叧閿瘝锛岃繑鍥烇紙鏉垮潡:浠g爜闆嗗悎锛夛紝浠g爜闆嗗悎涓凡缁忔帓闄よ嚜韬� if not keys: - return cls.BLOCK_TYPE_NONE, None, "灏氭湭鎵惧埌娑ㄥ仠鍘熷洜" + return None, "灏氭湭鎵惧埌娑ㄥ仠鍘熷洜" code_limit_up_reason_dict = {} load_code_block() msg_list = [] @@ -469,7 +469,7 @@ f"鏉垮潡-{block}: 涓嶆槸top4娑ㄥ仠鏉垮潡锛屾弧瓒崇簿閫�/琛屼笟娴佸叆瑕佹眰,涓嶄负涓绘澘榫�1锛堝疄鏃惰韩浣�-{current_shsz_rank},鍘嗗彶韬綅-{record_shsz_rank}锛�") continue if len(can_buy_blocks) == len(keys): - blocks = "/".join([x[0] for x in can_buy_blocks]) + blocks = [x[0] for x in can_buy_blocks] blocks_msg = "\n".join([x[1] for x in can_buy_blocks]) return blocks, blocks_msg @@ -483,10 +483,10 @@ if constant.TEST: return True, "", cls.BLOCK_TYPE_NONE - block, block_msg = cls.get_can_buy_block(code, current_limit_up_datas, - limit_up_record_datas, yesterday_current_limit_up_codes, - before_blocks_dict) - if block is None: + blocks, block_msg = cls.get_can_buy_block(code, current_limit_up_datas, + limit_up_record_datas, yesterday_current_limit_up_codes, + before_blocks_dict) + if not blocks: return False, block_msg # ---------------------------------鍒ゆ柇鐩爣浠g爜鐨勬澘鍧�-------------------start------------ @@ -567,11 +567,11 @@ # ---------------------------------鍔犺浇宸茬粡涓嬪崟/鎴愪氦鐨勪唬鐮佷俊鎭�------------end------------- msg_list = [] - for key in [block]: + for key in blocks: # 鏉垮潡涓凡缁忔湁鎴愪氦鐨勫氨涓嶄笅鍗曚簡 if key in trade_success_blocks_count: success_codes_count = len(trade_success_blocks_count[key]) - if success_codes_count >= 2: + if success_codes_count >= 1: msg_list.append(f"銆恵key}銆戜腑宸茬粡鏈墈success_codes_count}涓垚浜や唬鐮�") log.logger_kpl_debug.debug(f"{code}锛氭澘鍧楋紙{key}锛夊凡缁忔湁鎴愪氦銆恵trade_success_blocks_count[key]}銆�") continue -- Gitblit v1.8.0