Administrator
2024-06-12 0eb33b4b4ed94940355c26a04e897c42f4838e58
bug修复
3个文件已修改
13 ■■■■■ 已修改文件
cancel_strategy/s_l_h_cancel_strategy.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
huaxin_client/code_queue_distribute_manager.py 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
huaxin_client/l2_client.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cancel_strategy/s_l_h_cancel_strategy.py
@@ -1021,7 +1021,7 @@
        # 保存数据
        if changed:
            threshold_time = 1 if tool.is_sz_code(code) else 2
            if l_up_compute_info:
            if l_up_compute_info and l_up_compute_info[1]:
                if time.time() - l_up_compute_info[0] < threshold_time:
                    l2_log.l_cancel_debug(code, f"L前监控更新太频繁:{threshold_time}")
                    return
huaxin_client/code_queue_distribute_manager.py
@@ -1,6 +1,7 @@
"""
代码队列管理
"""
import copy
class CodeQueueDistributeManager:
@@ -43,6 +44,7 @@
    # 获取空闲的位置数量
    def get_free_queue_count(self):
        return len(self.queue_list) - len(self.distibuted_code_queue_dict.keys())
# 回调对象分配
class CodeDataCallbackDistributeManager:
@@ -88,3 +90,11 @@
    # 获取空闲的位置数量
    def get_free_queue_count(self):
        return len(self.callback_list) - len(self.distibuted_code_callback_dict.keys())
    def get_distributed_codes(self):
        """
        获取已经分配的代码
        @return:
        """
        codes = self.distibuted_code_callback_dict.keys()
        return copy.deepcopy(codes)
huaxin_client/l2_client.py
@@ -149,6 +149,7 @@
                self.l2_data_upload_manager.distribute_upload_queue(c)
                l2_data_manager.add_target_code(c)
        except Exception as e:
            #TODO 清除原来还没释放掉的数据
            logger_system.error(f"L2代码分配上传队列出错:{str(e)}")
            logger_system.exception(e)
        self.__subscribe(add_codes)