fix(定时任务): 工程启动时增加quartz相关的log输出

工程启动时增加quartz相关的log输出
This commit is contained in:
song-tianyang 2021-12-16 10:47:38 +08:00 committed by song-tianyang
parent c8f887019d
commit 5f179a5018
1 changed files with 13 additions and 3 deletions

View File

@ -72,6 +72,12 @@ public class AppStartListener implements ApplicationListener<ApplicationReadyEve
@Value("${quartz.properties.org.quartz.jobStore.acquireTriggersWithinLock}")
private String acquireTriggersWithinLock;
@Value("${quartz.enabled}")
private boolean quartzEnable;
@Value("${quartz.scheduler-name}")
private String quartzScheduleName;
@Value("${quartz.thread-count}")
private int quartzThreadCount;
@Override
public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
@ -96,8 +102,11 @@ public class AppStartListener implements ApplicationListener<ApplicationReadyEve
} catch (InterruptedException e) {
e.printStackTrace();
}
LogUtil.info("开始启动定时任务。 定时任务 acquireTriggersWithinLock 设置:"+acquireTriggersWithinLock);
LogUtil.info("开始启动定时任务。 相关设置:" +
"quartz.acquireTriggersWithinLock :" + acquireTriggersWithinLock + "\r\n" +
"quartz.enabled :" + quartzEnable + "\r\n" +
"quartz.scheduler-name :" + quartzScheduleName + "\r\n" +
"quartz.thread-count :" + quartzThreadCount + "\r\n");
scheduleService.startEnableSchedules();
}
@ -106,6 +115,7 @@ public class AppStartListener implements ApplicationListener<ApplicationReadyEve
/**
* 处理初始化数据兼容数据
* 只在第一次升级的时候执行一次
*
* @param initFuc
* @param key
*/
@ -139,7 +149,7 @@ public class AppStartListener implements ApplicationListener<ApplicationReadyEve
initOnceOperate(testPlanLoadCaseService::initOrderField, "init.sort.plan.api.load");
initOnceOperate(testReviewTestCaseService::initOrderField, "init.sort.review.test.case");
initOnceOperate(apiDefinitionService::initDefaultModuleId, "init.default.module.id");
initOnceOperate(mockConfigService::initExpectNum,"init.mock.expectNum");
initOnceOperate(mockConfigService::initExpectNum, "init.mock.expectNum");
}
/**