| | |
| | | from huaxin_client.client_network import SendResponseSkManager |
| | | |
| | | # 活动时间 |
| | | from log_module.log import logger_local_huaxin_l2_error |
| | | from log_module.log import logger_local_huaxin_l2_error, logger_local_huaxin_l2_upload |
| | | |
| | | order_detail_upload_active_time_dict = {} |
| | | transaction_upload_active_time_dict = {} |
| | |
| | | |
| | | tmep_order_detail_queue_dict[code].put( |
| | | (data['SecurityID'], data['Price'], data['Volume'], data['Side'], data['OrderType'], data['OrderTime'], |
| | | data['MainSeq'], data['SubSeq'], data['OrderNO'], data['OrderStatus'], int(time.time()*1000))) |
| | | data['MainSeq'], data['SubSeq'], data['OrderNO'], data['OrderStatus'], int(time.time() * 1000))) |
| | | |
| | | |
| | | # 添加逐笔成交 |
| | |
| | | temp = tmep_order_detail_queue_dict[code].get() |
| | | udatas.append(temp) |
| | | if udatas: |
| | | start_time = time.time() |
| | | upload_data(code, "l2_order", udatas) |
| | | use_time = int((time.time() - start_time)*1000) |
| | | if use_time > 20: |
| | | logger_local_huaxin_l2_upload.info(f"{code}-上传代码耗时:{use_time}ms") |
| | | |
| | | time.sleep(0.01) |
| | | |