| | |
| | | if val: |
| | | val = json.loads(val) |
| | | _type = val["type"] |
| | | logger_local_huaxin_trade_debug.debug(f"获取到策略端信息:{val}") |
| | | cls.process_command_thread_pool.submit(lambda: cls.process_command(_type, None, val)) |
| | | |
| | | except Exception as e: |
| | |
| | | else: |
| | | send_response( |
| | | json.dumps({"type": "response", "data": {"code": 0, "data": data}, "client_id": client_id, |
| | | "request_id": request_id}), type, client_id, request_id, temp_params[2]) |
| | | "request_id": request_id}), type, client_id, request_id) |
| | | |
| | | async_log_util.info(logger_local_huaxin_trade_debug, "API回调结束 req_id-{} request_id-{}", req_id, request_id) |
| | | else: |
| | |
| | | fdata["redis_async_task_count"] = redis_manager.RedisUtils.get_async_task_count() |
| | | except: |
| | | pass |
| | | |
| | | # 获取交易通道 |
| | | try: |
| | | can_access = huaxin_trade_api.test_trade_channel() |
| | | fdata["trade_channel_access"] = 1 if can_access else 0 |
| | | except Exception as e: |
| | | logger_debug.exception(e) |
| | | fdata["trade_channel_access"] = 0 |
| | | |
| | | # 获取CPU与内存适用情况 |
| | | memory_info = psutil.virtual_memory() |
| | | cpu_percent = psutil.cpu_percent(interval=1) |