Commit 44dad93d by huangfusuper

kill节点执行节点回调

parent 35818a14
package com.byit.service.impl;
import com.byit.dto.BeanStrategyPackage;
import com.byit.enums.EmailEnum;
import com.byit.enums.RedisKeyNameEnum;
import com.byit.enums.RunRecordingEnum;
......@@ -9,12 +10,17 @@ import com.byit.model.JobTaskRunLogWithBLOBs;
import com.byit.model.JobTaskSchedule;
import com.byit.service.FastRunLogService;
import com.byit.service.JobTaskRunLogService;
import com.byit.strategy.TaskRunTheLifeCycleCallback;
import com.byit.util.ClassSortUtil;
import com.byit.util.SpringUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @author huangfu
......@@ -57,6 +63,19 @@ public class FastRunLogServiceImpl implements FastRunLogService {
jobTaskRunLog.setTriggerMsg(msg+LINE);
}
//获取该节点的全部声明周期函数
Map<String, TaskRunTheLifeCycleCallback> stringTaskRunTheLifeCycleCallbackMap = SpringUtil.getBeansOfType(TaskRunTheLifeCycleCallback.class);
//数据排序
List<BeanStrategyPackage<TaskRunTheLifeCycleCallback>> beanStrategyPackages = ClassSortUtil.objectSort(stringTaskRunTheLifeCycleCallbackMap);
beanStrategyPackages.forEach(beanStrategyPackage -> {
log.info("--------------脚本节点生命周期开始回调{}--------------", beanStrategyPackage.getBeanName());
TaskRunTheLifeCycleCallback beanStrategyPackageBean = beanStrategyPackage.getBean();
if (beanStrategyPackageBean.matchType(mythJobTaskSchedule)) {
beanStrategyPackageBean.postProcessAfterInitialization(mythJobTaskSchedule);
}
});
jobTaskRunLog.setRunParams(mythJobTaskSchedule.getRunParam());
jobTaskRunLog.setLogId(mythJobTaskSchedule.getLogId());
jobTaskRunLog.setScriptUrls(mythJobTaskSchedule.getScriptUrls());
jobTaskRunLog.setVersionName(mythJobTaskSchedule.getVersionName());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment