From 4199650c20e48cd3cb897a413aec13fa518c81cd Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期四, 12 五月 2022 18:15:35 +0800
Subject: [PATCH] #471

---
 src/main/java/com/genersoft/iot/vmp/conf/DynamicTask.java |   22 ++++++++++------------
 1 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/conf/DynamicTask.java b/src/main/java/com/genersoft/iot/vmp/conf/DynamicTask.java
index bd10317..2812f92 100644
--- a/src/main/java/com/genersoft/iot/vmp/conf/DynamicTask.java
+++ b/src/main/java/com/genersoft/iot/vmp/conf/DynamicTask.java
@@ -43,27 +43,27 @@
      * 寰幆鎵ц鐨勪换鍔�
      * @param key 浠诲姟ID
      * @param task 浠诲姟
-     * @param cycleForCatalog 闂撮殧
+     * @param cycleForCatalog 闂撮殧 姣
      * @return
      */
     public void startCron(String key, Runnable task, int cycleForCatalog) {
         ScheduledFuture future = futureMap.get(key);
         if (future != null) {
             if (future.isCancelled()) {
-                logger.info("浠诲姟銆恵}銆戝凡瀛樺湪浣嗘槸鍏抽棴鐘舵�侊紒锛侊紒", key);
+                logger.debug("浠诲姟銆恵}銆戝凡瀛樺湪浣嗘槸鍏抽棴鐘舵�侊紒锛侊紒", key);
             } else {
-                logger.info("浠诲姟銆恵}銆戝凡瀛樺湪涓斿凡鍚姩锛侊紒锛�", key);
+                logger.debug("浠诲姟銆恵}銆戝凡瀛樺湪涓斿凡鍚姩锛侊紒锛�", key);
                 return;
             }
         }
         // scheduleWithFixedDelay 蹇呴』绛夊緟涓婁竴涓换鍔$粨鏉熸墠寮�濮嬭鏃秔eriod锛� cycleForCatalog琛ㄧず鎵ц鐨勯棿闅�
-        future = threadPoolTaskScheduler.scheduleAtFixedRate(task, cycleForCatalog * 1000L);
+        future = threadPoolTaskScheduler.scheduleAtFixedRate(task, cycleForCatalog);
         if (future != null){
             futureMap.put(key, future);
             runnableMap.put(key, task);
-            logger.info("浠诲姟銆恵}銆戝惎鍔ㄦ垚鍔燂紒锛侊紒", key);
+            logger.debug("浠诲姟銆恵}銆戝惎鍔ㄦ垚鍔燂紒锛侊紒", key);
         }else {
-            logger.info("浠诲姟銆恵}銆戝惎鍔ㄥけ璐ワ紒锛侊紒", key);
+            logger.debug("浠诲姟銆恵}銆戝惎鍔ㄥけ璐ワ紒锛侊紒", key);
         }
     }
 
@@ -76,15 +76,14 @@
      */
     public void startDelay(String key, Runnable task, int delay) {
         stop(key);
-        System.out.println("瀹氭椂浠诲姟寮�濮嬩簡");
         Date starTime = new Date(System.currentTimeMillis() + delay);
 
         ScheduledFuture future = futureMap.get(key);
         if (future != null) {
             if (future.isCancelled()) {
-                logger.info("浠诲姟銆恵}銆戝凡瀛樺湪浣嗘槸鍏抽棴鐘舵�侊紒锛侊紒", key);
+                logger.debug("浠诲姟銆恵}銆戝凡瀛樺湪浣嗘槸鍏抽棴鐘舵�侊紒锛侊紒", key);
             } else {
-                logger.info("浠诲姟銆恵}銆戝凡瀛樺湪涓斿凡鍚姩锛侊紒锛�", key);
+                logger.debug("浠诲姟銆恵}銆戝凡瀛樺湪涓斿凡鍚姩锛侊紒锛�", key);
                 return;
             }
         }
@@ -93,14 +92,13 @@
         if (future != null){
             futureMap.put(key, future);
             runnableMap.put(key, task);
-            logger.info("浠诲姟銆恵}銆戝惎鍔ㄦ垚鍔燂紒锛侊紒", key);
+            logger.debug("浠诲姟銆恵}銆戝惎鍔ㄦ垚鍔燂紒锛侊紒", key);
         }else {
-            logger.info("浠诲姟銆恵}銆戝惎鍔ㄥけ璐ワ紒锛侊紒", key);
+            logger.debug("浠诲姟銆恵}銆戝惎鍔ㄥけ璐ワ紒锛侊紒", key);
         }
     }
 
     public void stop(String key) {
-        System.out.println("瀹氭椂浠诲姟缁撴潫浜�");
         if (futureMap.get(key) != null && !futureMap.get(key).isCancelled()) {
             futureMap.get(key).cancel(true);
             Runnable runnable = runnableMap.get(key);

--
Gitblit v1.8.0