[server] [ scheduler.script ] - 优化定时脚本任务部分的代码 - 1
This commit is contained in:
@@ -70,7 +70,7 @@ public class CommandResultReader implements StreamListener<String, MapRecord<Str
|
||||
|
||||
log.info("Octopus Agent [ {} ] execution of [ {} ] Time is [ {} ] stream recordId is [{}]",
|
||||
streamKey,
|
||||
key,
|
||||
executionResultFormat.get(1),
|
||||
key,
|
||||
messageId);
|
||||
// print to console
|
||||
|
||||
@@ -26,11 +26,6 @@ public class AgentScriptSchedulerJob extends QuartzJobBean {
|
||||
@Override
|
||||
protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
|
||||
|
||||
log.info("[ 定时脚本任务 ]被调用了,调用时间为: {}",
|
||||
TimeUtils.currentTimeString()
|
||||
);
|
||||
|
||||
// 解析 Scheduler 模块传递过来的参数
|
||||
JobDataMap jobDataMap = jobExecutionContext
|
||||
.getJobDetail()
|
||||
@@ -39,6 +34,11 @@ public class AgentScriptSchedulerJob extends QuartzJobBean {
|
||||
// ScriptScheduleDTO
|
||||
ScriptSchedulerDTO scriptSchedulerDTO = (ScriptSchedulerDTO) jobDataMap.get(SCRIPT_SCHEDULER_MISSION_KEY);
|
||||
|
||||
log.info("[ 定时脚本任务 ] - 调用时间为: {}; 执行内容为: {}",
|
||||
TimeUtils.currentTimeString(),
|
||||
scriptSchedulerDTO
|
||||
);
|
||||
|
||||
// 调用实际任务执行器, 实际执行定时任务的核心业务内容
|
||||
agentApplyScheduledScript.apply(scriptSchedulerDTO);
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ public class AgentApplyScheduledScript {
|
||||
// 需要更新数据库
|
||||
// 关联性数据库
|
||||
|
||||
log.info("[定时脚本任务]-[业务类]-实际执行完成!");
|
||||
log.info("[ 定时脚本任务 ] - [ 业务类 ] - 实际执行完成!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user