Browse Source

待办任务,队列数

shiyue 21 giờ trước cách đây
mục cha
commit
0a99fdf882
3 tập tin đã thay đổi với 92 bổ sung3 xóa
  1. 3 3
      energy-manage-service/src/main/resources/bootstrap.properties
  2. 76 0
      jarstart.sh
  3. 13 0
      pom.xml

+ 3 - 3
energy-manage-service/src/main/resources/bootstrap.properties

@@ -3,9 +3,9 @@ spring.cloud.nacos.config.server-addr = 192.168.50.234:8848
 spring.cloud.nacos.config.namespace = 79c42a7a-2c7d-4dcf-8a2c-b334271e2191
 spring.cloud.nacos.config.name=application.properties
 spring.cloud.nacos.config.group = @profiles.active@
-spring.cloud.nacos.config.extension-configs[0].data-id=analysis_type_config.properties
-spring.cloud.nacos.config.extension-configs[0].group=DEFAULT_GROUP
-spring.cloud.nacos.config.extension-configs[0].refresh=true
+#spring.cloud.nacos.config.extension-configs[0].data-id=analysis_type_config.properties
+#spring.cloud.nacos.config.extension-configs[0].group=DEFAULT_GROUP
+#spring.cloud.nacos.config.extension-configs[0].refresh=true
 
 
 #============================mybatis配置=========================================

+ 76 - 0
jarstart.sh

@@ -0,0 +1,76 @@
+#!/bin/bash
+
+echo Starting .........
+
+export LANG="en_US.UTF-8"
+
+nacospid = $(ps -ef|grep nacos|grep -v grep | awk '{print $2}')
+xxljobpid = $(ps -ef|grep xxl-job|grep -v grep | awk '{print $2}')
+platformpid = $(ps -ef|grep energy-manage-service|grep -v grep | awk '{print $2}')
+miniopid = $(ps -ef|grep minio|grep -v grep | awk '{print $2}')
+
+
+if systemctl is-active --quiet docker; then
+    echo "........docker 正在运行........"
+
+    if [ -n "$nacospid" ]
+      then
+        echo "正在运行的nacos进程 :$nacospid"
+        # kill -9 $nacospid
+        # echo  "========================================"
+        # echo "杀死:$nacospid 进程 "
+      else
+        echo "........ nacos未运行........"
+        # 启动nacos服务
+        /data/nacos/bin/startup.sh -m standalone
+        echo "........ nacos启动成功........"
+    fi
+
+    sleep 2s
+
+    if [ -n "$xxljobpid" ]
+      then
+        echo "正在运行的xxl-job进程 :$xxljobpid"
+        # kill -9 $xxljobpid
+        # echo  "========================================"
+        # echo "杀死:$xxljobpid 进程 "
+      else
+        echo "........ xxl-job未运行........"
+        # 启动xxl-job服务
+        nohup java -jar /data/xxl-job/xxl-job-admin.jar &
+        echo "........ xxl-job运行成功........"
+    fi
+
+    sleep 2s
+
+    if [ -n "$platformpid" ]
+      then
+        echo "正在运行的平台进程 :$platformpid"
+        # kill -9 $platformpid
+        # echo  "========================================"
+        # echo "杀死:$platformpid 进程 "
+      else
+        echo "........ 平台未运行........"
+        # 启动平台服务
+#        /data/app/start.sh
+        echo "........ 平台运行成功........"
+    fi
+
+    sleep 2s
+
+    if [ -n "$miniopid" ]
+      then
+        echo "正在运行的minio进程 :$miniopid"
+        # kill -9 $miniopid
+        # echo  "========================================"
+        # echo "杀死:$miniopid 进程 "
+      else
+        echo "........ minio文件系统未运行........"
+        # 启动minio服务
+        # /var/minio/minio-startup.sh
+        echo "........ minio运行成功........"
+    fi
+
+else
+    echo "........docker 未运行........"
+fi

+ 13 - 0
pom.xml

@@ -136,6 +136,13 @@
             <version>8.0.21</version>
         </dependency>
 
+        <!-- 达梦8 -->
+<!--        <dependency>-->
+<!--            <groupId>com.dameng</groupId>-->
+<!--            <artifactId>DmJdbcDriver18</artifactId>-->
+<!--            <version>8.1.1.193</version>-->
+<!--        </dependency>-->
+
         <!-- json -->
         <dependency>
             <groupId>com.alibaba</groupId>
@@ -354,6 +361,12 @@
                 <profiles.active>tidb</profiles.active>
             </properties>
         </profile>
+        <profile>
+            <id>dm</id>
+            <properties>
+                <profiles.active>dm</profiles.active>
+            </properties>
+        </profile>
     </profiles>
 
 </project>