| | |
| | | request_id = data.get('request_id') |
| | | use_time = time.time() - data.get('time') |
| | | data = data.get('data') |
| | | cls.action_callback.OnTrade(None, request_id, None, 2, data) |
| | | async_log_util.info(logger_local_huaxin_trade_debug, f"下单通信耗时: {use_time}s") |
| | | cls.action_callback.OnTrade(None, request_id, None, 1, data) |
| | | async_log_util.info(logger_local_huaxin_trade_debug, f"下单通信耗时: {round(use_time*1000,3)}ms request_id:{request_id}") |
| | | except Exception as e: |
| | | logger_local_huaxin_trade_debug.exception(e) |
| | | finally: |
| | |
| | | use_time = time.time() - data.get('time') |
| | | data = data.get('data') |
| | | cls.action_callback.OnTrade(None, request_id, None, 2, data) |
| | | async_log_util.info(logger_local_huaxin_trade_debug, f"撤单通信耗时: {use_time}s") |
| | | async_log_util.info(logger_local_huaxin_trade_debug, f"撤单通信耗时: {round(use_time*1000,3)}ms request_id:{request_id}") |
| | | |
| | | except Exception as e: |
| | | logger_local_huaxin_trade_debug.exception(e) |