From a63c400ff367e3cec30db6425a142d67dbaf158d Mon Sep 17 00:00:00 2001
From: liriming <1343021927@qq.com>
Date: 星期一, 02 十二月 2024 09:28:24 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 shasteel-biz/src/main/java/com/iailab/module/shasteel/job/utils/ScheduleUtils.java |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/utils/ScheduleUtils.java b/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/utils/ScheduleUtils.java
index 4f1c9f0..0433c16 100644
--- a/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/utils/ScheduleUtils.java
+++ b/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/utils/ScheduleUtils.java
@@ -2,7 +2,6 @@
 
 import com.iailab.framework.common.constant.Constant;
 import com.iailab.framework.common.enums.ErrorCode;
-import com.iailab.framework.common.exception.ServerException;
 import com.iailab.module.shasteel.job.entity.ScheduleJobEntity;
 import org.quartz.*;
 
@@ -39,7 +38,7 @@
         try {
             return (CronTrigger) scheduler.getTrigger(getTriggerKey(jobId));
         } catch (SchedulerException e) {
-            throw new ServerException(ErrorCode.JOB_ERROR, e.getMessage());
+            throw new RuntimeException("获取表达式触发器异常", e);
         }
     }
 
@@ -68,7 +67,7 @@
             	pauseJob(scheduler, scheduleJob.getId());
             }
         } catch (SchedulerException e) {
-            throw new ServerException(ErrorCode.JOB_ERROR, e.getMessage());
+            throw new RuntimeException("创建定时任务异常", e);
         }
     }
     
@@ -99,7 +98,7 @@
             }
             
         } catch (SchedulerException e) {
-            throw new ServerException(ErrorCode.JOB_ERROR, e.getMessage());
+            throw new RuntimeException("更新定时任务异常", e);
         }
     }
 
@@ -114,7 +113,7 @@
         	
             scheduler.triggerJob(getJobKey(scheduleJob.getId()), dataMap);
         } catch (SchedulerException e) {
-            throw new ServerException(ErrorCode.JOB_ERROR, e.getMessage());
+            throw new RuntimeException("立即执行任务异常", e);
         }
     }
 
@@ -125,7 +124,7 @@
         try {
             scheduler.pauseJob(getJobKey(jobId));
         } catch (SchedulerException e) {
-            throw new ServerException(ErrorCode.JOB_ERROR, e.getMessage());
+            throw new RuntimeException("暂停任务异常", e);
         }
     }
 
@@ -136,7 +135,7 @@
         try {
             scheduler.resumeJob(getJobKey(jobId));
         } catch (SchedulerException e) {
-            throw new ServerException(ErrorCode.JOB_ERROR, e.getMessage());
+            throw new RuntimeException("恢复任务异常", e);
         }
     }
 
@@ -147,7 +146,7 @@
         try {
             scheduler.deleteJob(getJobKey(jobId));
         } catch (SchedulerException e) {
-            throw new ServerException(ErrorCode.JOB_ERROR, e.getMessage());
+            throw new RuntimeException("删除定时任务异常", e);
         }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3