Commit dfdd469e by huangfusuper

调度中心集成rpc框架

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