liurunyu
2023-12-07 60bd6a383b3f7c0d4922517974da9525a0166b68
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/support/SupportUnit.java
@@ -39,31 +39,36 @@
   public void start(UnitStartedCallbackInterface callback) throws Exception {
      if(!started){
         started = true ;
         if(confVo.enableThreadPool){
            TreadPoolFactory.initThreadPoolShort("短任务工作线程池",
                  this.confVo.short_maxThread,
                  this.confVo.short_minThread,
                  this.confVo.short_freeTimeout,
         if(confVo.enableShortThreadPool) {
            TreadPoolFactory.initThreadPoolShort("短任务工作线程池",
                  this.confVo.short_maxThread,
                  this.confVo.short_minThread,
                  this.confVo.short_freeTimeout,
                  this.confVo.short_busyTimeout);
            TreadPoolFactory.initThreadPoolLong("长任务工作线程池",
                  this.confVo.long_maxThread,
                  this.confVo.long_minThread,
                  this.confVo.long_freeTimeout,
                  this.confVo.long_busyTimeout);
            if(this.confVo.showStartInfo){
               System.out.println("线程池模块成功启动");
            }
         }else{
            System.out.println("短线程池配置不启动");
         }
         callback.call(null);
         if(confVo.enableLongThreadPool) {
            TreadPoolFactory.initThreadPoolLong("长任务工作线程池",
                  this.confVo.long_maxThread,
                  this.confVo.long_minThread,
                  this.confVo.long_freeTimeout,
                  this.confVo.long_busyTimeout);
         }else{
            System.out.println("长线程池配置不启动");
         }
         if(this.confVo.showStartInfo){
            System.out.println("线程池模块成功启动");
         }
      }
      callback.call(null);
   }
   @Override
   public void stop(UnitStartedCallbackInterface callback) throws Exception {
   public void stop(UnitStartedCallbackInterface callback) {
   }
   
   /*
   public static void main(String[] args) throws Exception{
      SupportUnitConfigVo supVo = new SupportUnitConfigVo() ;
      //短工作时长线程池,线程负责用时较短的工作任务
@@ -106,7 +111,6 @@
      public void setConfig(SupportUnitConfigVo configVo) {
         this.configVo = configVo;
      }
   }
   */
}