| | |
| | | # self.__upload_l2_data(code, upload_queue, temp_list) |
| | | # self.__upload_l2_order_data(code, temp_list) |
| | | __start_time = time.time() |
| | | last_data = temp_list[-1] |
| | | self.data_callback_distribute_manager.get_distributed_callback(code).OnL2Order(code, temp_list, |
| | | time.time()) |
| | | use_time = time.time() - __start_time |
| | | if use_time > 0.01: |
| | | # 记录10ms以上的数据 |
| | | huaxin_l2_log.info(logger_local_huaxin_l2_error, f"耗时:{use_time}s 结束数据:{temp_list[-1]}") |
| | | huaxin_l2_log.info(logger_local_huaxin_l2_error, f"耗时:{use_time}s 结束数据:{last_data}") |
| | | temp_list = [] |
| | | else: |
| | | if code not in self.temp_order_queue_dict: |
| | |
| | | except Exception as e: |
| | | logging.exception(e) |
| | | finally: |
| | | pass |
| | | temp_list.clear() |
| | | |
| | | # 处理成交数据并上传 |
| | | def __run_upload_transaction_task(self, code): |
| | |
| | | except: |
| | | pass |
| | | finally: |
| | | pass |
| | | temp_list.clear() |
| | | |
| | | def __run_log_task(self, code): |
| | | q: queue.Queue = self.temp_log_queue_dict.get(code) |