添加对python算法的支持

This commit is contained in:
2026-07-30 18:46:32 +08:00
parent 7eb3b89714
commit 86af7f30be
25 changed files with 13525 additions and 2 deletions
+11 -1
View File
@@ -434,7 +434,17 @@ class ComputeService:
try:
# 通过UDP发送计算命令
start_time = datetime.now()
out_path = self.udp_handler.compute(mat_path, timeout)
if config_manager.get('alg_caller', "UDP") == "UDP":
out_path = self.udp_handler.compute(mat_path, timeout)
else:
try:
from algorithm.gateway import cpyAlgorithm
out_path = cpyAlgorithm(mat_path)
except Exception as e:
logger.error(f"Failed to compute: {e}")
return None, None
end_time = datetime.now()
logger.info(f"---------------Computing used time: {end_time - start_time}---------------")