Commit dfdd469e by huangfusuper

调度中心集成rpc框架

parent 46e85c29
......@@ -2,19 +2,14 @@ package com.byit.task;
import com.byit.conf.MythJobAutoConfigure;
import com.byit.enums.NodePropertyEnum;
import com.byit.executor.api.ScriptExecutorService;
import com.byit.job.dto.DispatchResponseDto;
import com.byit.job.dto.ScriptDto;
import com.byit.job.enums.JobResultEnum;
import com.byit.model.JobTaskSchedule;
import com.byit.rpc.remoting.invoker.annotation.RpcReference;
import com.byit.service.RunScriptService;
import com.byit.util.SpringUtil;
import io.netty.util.Timeout;
import io.netty.util.TimerTask;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
/**
* @author Administrator
......@@ -24,11 +19,7 @@ public class ScriptExecutorJobTask implements TimerTask {
private JobTaskSchedule mythJobTaskSchedule;
public JobTaskSchedule getMythJobTaskSchedule() {
return mythJobTaskSchedule;
}
public void setMythJobTaskSchedule(JobTaskSchedule mythJobTaskSchedule) {
public ScriptExecutorJobTask(JobTaskSchedule mythJobTaskSchedule) {
this.mythJobTaskSchedule = mythJobTaskSchedule;
}
......
......@@ -337,8 +337,7 @@ public class JobScheduleHelper{
JavaBeanJobTask javaBeanJobTask = new JavaBeanJobTask(mythJobTaskSchedule);
WorkRoulette.addJob(javaBeanJobTask,triggerTime);
}else if("SCRIPT".equals(mythJobTaskSchedule.getJobType())){
ScriptExecutorJobTask scriptExecutorJobTask = new ScriptExecutorJobTask();
scriptExecutorJobTask.setMythJobTaskSchedule(mythJobTaskSchedule);
ScriptExecutorJobTask scriptExecutorJobTask = new ScriptExecutorJobTask(mythJobTaskSchedule);
WorkRoulette.addJob(scriptExecutorJobTask,triggerTime);
}
jobTaskScheduleService.delete(mythJobTaskSchedule.getId());
......
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