Parcourir la source

任务组获取方式fix

xueli.xue il y a 9 ans
Parent
commit
f60cce5ba7

+ 2 - 2
xxl-job-admin/src/main/java/com/xxl/job/core/util/DynamicSchedulerUtil.java

@@ -102,8 +102,8 @@ public final class DynamicSchedulerUtil implements InitializingBean {
 	// fill job info
 	public static void fillJobInfo(XxlJobInfo jobInfo) {
 		// TriggerKey : name + group
-        TriggerKey triggerKey = TriggerKey.triggerKey(jobInfo.getJobName(), Scheduler.DEFAULT_GROUP);
-        JobKey jobKey = new JobKey(jobInfo.getJobName(), Scheduler.DEFAULT_GROUP);
+        TriggerKey triggerKey = TriggerKey.triggerKey(jobInfo.getJobName(), jobInfo.getJobGroup());
+        JobKey jobKey = new JobKey(jobInfo.getJobName(), jobInfo.getJobGroup());
         try {
 			Trigger trigger = scheduler.getTrigger(triggerKey);
 			JobDetail jobDetail = scheduler.getJobDetail(jobKey);