| | |
| | | tradeServerProcess = multiprocessing.Process(target=createTradeServer, |
| | | args=(pss_strategy, pst_strategy, pl1t_strategy, psl2_strategy)) |
| | | tradeServerProcess.start() |
| | | print("psl2_strategy id:", id(psl2_strategy)) |
| | | psl2_strategy.send("test123123") |
| | | |
| | | # 交易进程与L2进程 |
| | | tradeProcess = multiprocessing.Process(target=lambda: huaxin_api.trade_client.run(ptl2_trade, pst_trade)) |
| | |
| | | "data": datas, |
| | | "request_id": f"{ClientSocketManager.CLIENT_TYPE_CMD_L2}_{round(time.time() * 1000)}"} |
| | | # root_data = socket_util.encryp_client_params_sign(root_data) |
| | | pipe_l2.send(json.dumps(root_data)) |
| | | print("向L2发送数据:", id(pipe_l2)) |
| | | # pipe_l2.send(json.dumps(root_data)) |
| | | pipe_l2.send(f"{time.time()}") |
| | | print("向L2发送数据") |
| | | |
| | | except Exception as e: |
| | | logging.exception(e) |
| | | finally: |