新增任务测试Demo,方便在开发时进行任务逻辑测试;
This commit is contained in:
parent
bbd64b9055
commit
debbc9d278
|
@ -836,6 +836,8 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
|
|||
- 2、失败处理策略;调度失败时的处理策略,策略包括:失败告警(默认)、失败重试;
|
||||
- 3、通讯时间戳超时时间调整为180s;
|
||||
- 4、执行器与数据库彻底解耦,但是执行器需要配置调度中心集群地址。调度中心提供API供执行器回调和心跳注册服务,取消调度中心内部jetty,心跳周期调整为30s,心跳失效为三倍心跳;
|
||||
- 5、执行参数编辑时丢失问题修复;
|
||||
- 6、新增任务测试Demo,方便在开发时进行任务逻辑测试;
|
||||
|
||||
#### TODO LIST
|
||||
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
|
||||
|
@ -844,7 +846,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
|
|||
- 4、失败重试优化:目前失败重试逻辑为,在本次调度请求失败后重新执行一次请求逻辑。优化点为针对调度和执行失败时均做失败重试,重试时重新触发一次完整调度,这将可能导致失败是调度死循环,考虑中。
|
||||
- 5、回调失败写文件,查看日志时读文件确认,重启后回调确认;
|
||||
- 6、任务依赖,流程图,子任务+会签任务,各节点日志;
|
||||
|
||||
- 7、调度任务优先级;
|
||||
|
||||
## 七、其他
|
||||
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
package com.xxl.executor.test;
|
||||
|
||||
import com.xxl.job.core.biz.ExecutorBiz;
|
||||
import com.xxl.job.core.biz.model.ReturnT;
|
||||
import com.xxl.job.core.biz.model.TriggerParam;
|
||||
import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
|
||||
import com.xxl.job.core.glue.GlueTypeEnum;
|
||||
import com.xxl.job.core.rpc.netcom.NetComClientProxy;
|
||||
|
||||
/**
|
||||
* Created by xuxueli on 17/5/12.
|
||||
*/
|
||||
public class DemoJobHandlerTest {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
// param
|
||||
String jobHandler = "demoJobHandler";
|
||||
String params = "";
|
||||
|
||||
// trigger data
|
||||
TriggerParam triggerParam = new TriggerParam();
|
||||
triggerParam.setJobId(1);
|
||||
triggerParam.setExecutorHandler(jobHandler);
|
||||
triggerParam.setExecutorParams(params);
|
||||
triggerParam.setExecutorBlockStrategy(ExecutorBlockStrategyEnum.COVER_EARLY.name());
|
||||
triggerParam.setGlueType(GlueTypeEnum.BEAN.name());
|
||||
triggerParam.setGlueSource(null);
|
||||
triggerParam.setGlueUpdatetime(System.currentTimeMillis());
|
||||
triggerParam.setLogId(1);
|
||||
triggerParam.setLogDateTim(System.currentTimeMillis());
|
||||
|
||||
// do remote trigger
|
||||
ExecutorBiz executorBiz = (ExecutorBiz) new NetComClientProxy(ExecutorBiz.class, "127.0.0.1:9999").getObject();
|
||||
ReturnT<String> runResult = executorBiz.run(triggerParam);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue