Explorar o código

添加执行清理chrome进程脚本

syh %!s(int64=5) %!d(string=hai) anos
pai
achega
9323fc50a5

+ 4 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouCommentAutoDelete.java

@@ -9,12 +9,15 @@ import org.quartz.Job;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 
 import java.util.HashMap;
 import java.util.List;
 
 @Slf4j
 public class KuaishouCommentAutoDelete implements Job {
+    @Value("${chrome.script.clean}")
+    private String cleanUrl;
     @Autowired
     private IKuaishouWebInterfaceService kuaishouWebInterfaceService;
     @Autowired
@@ -35,6 +38,7 @@ public class KuaishouCommentAutoDelete implements Job {
                             log.info("正在删除评论:{}", account.getAccountName());
                             kuaishouWebInterfaceService.adkuaishouWebLogin(account.getAccountName(), account.getPassword());
                             kuaishouWebInterfaceService.deleteAllComment(new HashMap<>());
+                            Runtime.getRuntime().exec(cleanUrl);
                             Thread.sleep(10000);
                         } catch (Exception e) {
                             e.printStackTrace();

+ 3 - 0
jeecg-boot-module-system/src/main/resources/application-dev.yml

@@ -156,3 +156,6 @@ logging:
   level:
     root: info
   config: classpath:logback-dev.xml
+chrome:
+  script:
+    clean: /mnt/webapp/cleanProcess.sh

+ 3 - 0
jeecg-boot-module-system/src/main/resources/application-prod.yml

@@ -153,4 +153,7 @@ logging:
   level:
     root: info
   config: classpath:logback-prod.xml
+chrome:
+  script:
+    clean: /mnt/webapp/cleanProcess.sh
 

+ 3 - 0
jeecg-boot-module-system/src/main/resources/application-test.yml

@@ -156,3 +156,6 @@ logging:
   level:
     root: info
   config: classpath:logback-test.xml
+chrome:
+  script:
+    clean: /mnt/webapp/cleanProcess.sh