yumeng 5 år sedan
förälder
incheckning
5069e0dd08

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

@@ -38,7 +38,16 @@ public class KuaishouCommentAutoDelete implements Job {
                             log.info("正在删除评论:{}", account.getAccountName());
                             kuaishouWebInterfaceService.adkuaishouWebLogin(account.getAccountName(), account.getPassword());
                             kuaishouWebInterfaceService.deleteAllComment(new HashMap<>());
-                            Runtime.getRuntime().exec(cleanUrl);
+                            Runtime runtime = Runtime.getRuntime();
+                            Process pro = runtime.exec(cleanUrl);
+                            int status = pro.waitFor();
+                            if (status == 0) {
+                                log.info("success,删除评论调用shell脚本执行成功");
+                            } else {
+                                log.info("error,删除评论调用shell脚本执行失败");
+                            }
+
+
                             Thread.sleep(10000);
                         } catch (Exception e) {
                             e.printStackTrace();