Ver Fonte

更新车辆模板时同时更新车辆

root há 2 anos atrás
pai
commit
c8fe696a66

+ 3 - 2
simulation-resource-scheduler/src/main/java/com/css/simulation/resource/scheduler/manager/TaskManager.java

@@ -29,7 +29,6 @@ import org.apache.sshd.client.session.ClientSession;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.stereotype.Component;
-import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.io.IOException;
@@ -91,8 +90,10 @@ public class TaskManager {
     @Resource
     VideoService videoService;
 
+    /**
+     * 加事务的话高并发情况下会死锁
+     */
     @SneakyThrows
-    @Transactional
     public boolean isProjectCompleted(PrefixTO redisPrefix, String projectId, String projectType, String maxSimulationTime, String taskId, String state, String podName) {
         String nodeName = projectUtil.getNodeNameOfPod(podName);
         if ("Running".equals(state)) {  // 运行中的 pod 无需删除