提交 4e0d1be6 编写于 作者: 许雪里's avatar 许雪里

心跳注册和结果回调,重试逻辑优化

上级 09d89524
......@@ -79,7 +79,7 @@ public class XxlJobExecutor implements ApplicationContextAware {
}
// init executor-server
initExecutorServer();
initExecutorServer(port, ip, appName, accessToken);
}
public void destroy(){
// destory JobThreadRepository
......@@ -118,7 +118,7 @@ public class XxlJobExecutor implements ApplicationContextAware {
// ---------------------------------- executor-server ------------------------------------
private NetComServerFactory serverFactory = new NetComServerFactory();
private void initExecutorServer() throws Exception {
private void initExecutorServer(int port, String ip, String appName, String accessToken) throws Exception {
NetComServerFactory.putService(ExecutorBiz.class, new ExecutorBizImpl()); // rpc-service, base on jetty
NetComServerFactory.setAccessToken(accessToken);
serverFactory.start(port, ip, appName); // jetty + registry
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册