Administrator
2023-07-27 cda53e53c3b1c92d289b234a3a0106e66e2cac38
bug修复
1个文件已修改
11 ■■■■ 已修改文件
server.py 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server.py
@@ -10,7 +10,7 @@
import threading
import time
from utils import alert_util, data_process, global_util, ths_industry_util, tool, import_util
from utils import alert_util, data_process, global_util, ths_industry_util, tool, import_util, socket_util
from code_attribute import code_volumn_manager, code_nature_analyse, global_data_loader, gpcode_manager, \
    gpcode_first_screen_manager
import constant
@@ -22,7 +22,7 @@
import l2.l2_data_util
from output import code_info_output
from third_data import  block_info, kpl_api
from third_data import block_info, kpl_api
from third_data.code_plate_key_manager import CodesHisReasonAndBlocksManager
from third_data.history_k_data_util import HistoryKDatasUtils
from third_data.kpl_data_manager import KPLCodeLimitUpReasonManager, KPLLimitUpDataRecordManager
@@ -108,8 +108,6 @@
                try:
                    # 如果带有头
                    if _str.startswith("##"):
                        print("server接受到数据:",_str)
                        total_length = int(_str[2:10])
                        _str = _str[10:]
                        # 防止socket数据发生粘连
@@ -271,11 +269,13 @@
                        # if limit_up_time_manager.get_limit_up_time(d["code"]) is None:
                        #     limit_up_time_manager.save_limit_up_time(d["code"], d["time"])
                elif type == 22:
                    print("---接受到首板代码")
                    try:
                        if int(tool.get_now_time_str().replace(":", "")) < int("092500"):
                            raise Exception('未到接受时间')
                        # 首板代码
                        dataList, is_add = data_process.parseGPCode(_str)
                        print("首板代码数量:", len(dataList))
                        limit_up_price_dict = {}
                        temp_codes = []
                        codes = []
@@ -469,7 +469,8 @@
                    except Exception as e:
                        logging.exception(e)
                    finally:
                        return_str = json.dumps({"code": 0})
                        print("首板代码处理完毕:")
                        return_str = socket_util.load_header(json.dumps({"code": 0}))
                elif type == 3:
                    # 交易成功信息