孟令鑫 1 yıl önce
ebeveyn
işleme
b0c8488d56

+ 1 - 2
api-common/src/main/java/api/common/util/HttpUtil.java

@@ -181,8 +181,7 @@ public class HttpUtil {
                 throw new RuntimeException("请求错误:" + response);
             }
         } catch (org.apache.http.conn.ConnectTimeoutException cte) {
-            log.debug(url + " 请求超时。", cte);
-            log.info(url + " 请求超时。");
+            log.info(url + " 请求超时。", cte);
         } catch (Exception e) {
             log.info("请求 " + url + " 失败。", e);
         }

+ 3 - 2
simulation-resource-common/src/main/java/com/css/simulation/resource/common/infra/configuration/oauth/OAuth2ResourceServerConfiguration.java

@@ -34,8 +34,9 @@ public class OAuth2ResourceServerConfiguration extends ResourceServerConfigurerA
         http.csrf().disable()   // 禁用 csrf
                 .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)// 无状态验证
                 .and()
-                .authorizeRequests().anyRequest()
-                .access("#oauth2.hasScope('all')") // 拦截所有请求判断 scope
+                .authorizeRequests()
+                .antMatchers("/simulation/resource/common/redis/getDictMaps").permitAll()
+                .anyRequest().access("#oauth2.hasScope('all')") // 拦截所有请求判断 scope
         ;
     }
 }

+ 1 - 1
simulation-resource-scheduler/src/main/resources/kubernetes/template/pod/carsim-pod-template.yaml

@@ -20,7 +20,7 @@ spec:
       hostnames:
         - gpu001
   initContainers:
-    - name: init-algorithm-image
+    - name: initAlgorithmImageContainer
       image: algorithm-image
       imagePullPolicy: Always
       command: [ 'sh', '-c', 'echo algorithm image downloaded && sleep 2' ]

+ 1 - 1
simulation-resource-scheduler/src/main/resources/kubernetes/template/pod/vtd-pod-template.yaml

@@ -22,7 +22,7 @@ spec:
       hostnames:
         - gpu001
   initContainers:
-    - name: init-algorithm-image
+    - name: initAlgorithmImageContainer
       image: algorithm-image
       imagePullPolicy: Always
       command: ['sh', '-c', 'echo algorithm image downloaded && sleep 2']

+ 4 - 3
simulation-resource-server/src/main/java/com/css/simulation/resource/server/app/impl/SimulationProjectServiceImpl.java

@@ -1598,7 +1598,8 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
             }
             return algorithmList;
         } catch (Exception e) {
-            throw new RuntimeException("第三方算法已被删除。");
+            log.error("获取第三方算法平台的算法信息失败。", e);
+            throw new RuntimeException("获取第三方算法平台的算法信息失败。");
         }
 
     }
@@ -2146,10 +2147,10 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
                 String timeActual = "0";
                 String timeCorrection = "0";
 
-                if (StringUtil.isNotEmpty(sp.getTimeActual())){
+                if (StringUtil.isNotEmpty(sp.getTimeActual())) {
                     timeActual = sp.getTimeActual();
                 }
-                if (StringUtil.isNotEmpty(sp.getTimeCorrection())){
+                if (StringUtil.isNotEmpty(sp.getTimeCorrection())) {
                     timeCorrection = sp.getTimeCorrection();
                 }
 

+ 1 - 1
simulation-resource-server/src/main/java/com/css/simulation/resource/server/app/service/job_manage/JobManageApplicationService.java

@@ -21,7 +21,7 @@ public class JobManageApplicationService {
         //1 获取最新的项目ID
         String projectId = projectDomainService.getLastProjectIdByAlgorithmId(algorithmId);
         if (StringUtil.isEmpty(projectId)) {
-            log.warn("算法 "+ algorithmId+"还未执行过项目。");
+//            log.warn("算法 "+ algorithmId+"还未执行过项目。");
             return null;
         }
         String projectType = projectDomainService.getProjectTypeByProjectId(projectId);