添加对python算法的支持
This commit is contained in:
+11
-1
@@ -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}---------------")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user