Update engine_client.py (#2931)

This commit is contained in:
ltd0924
2025-07-21 11:42:16 +08:00
committed by GitHub
parent 17c5d3a241
commit cc4cec0a74

View File

@@ -81,9 +81,6 @@ class EngineClient:
""" """
Format the request data and send the request to the server. Format the request data and send the request to the server.
""" """
if "request_id" in prompts:
prompts["request_id"] = prompts["request_id"]
if "request_id" not in prompts: if "request_id" not in prompts:
request_id = str(uuid.uuid4()) request_id = str(uuid.uuid4())
prompts["request_id"] = request_id prompts["request_id"] = request_id
@@ -144,7 +141,7 @@ class EngineClient:
task["preprocess_end_time"] = time.time() task["preprocess_end_time"] = time.time()
preprocess_cost_time = task["preprocess_end_time"] - task["preprocess_start_time"] preprocess_cost_time = task["preprocess_end_time"] - task["preprocess_start_time"]
api_server_logger.info( api_server_logger.info(
f"Cache request with request_id ({task.get('request_id')}), " f"cost {time.time() - preprocess_cost_time}" f"Cache request with request_id ({task.get('request_id')}), " f"preprocess time cost {preprocess_cost_time}"
) )
self.vaild_parameters(task) self.vaild_parameters(task)