Quellcode durchsuchen

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

xuxueli vor 8 Jahren
Ursprung
Commit
4e0d1be677

+ 2 - 2
xxl-job-core/src/main/java/com/xxl/job/core/executor/XxlJobExecutor.java Datei anzeigen

@@ -79,7 +79,7 @@ public class XxlJobExecutor implements ApplicationContextAware {
79 79
         }
80 80
 
81 81
         // init executor-server
82
-        initExecutorServer();
82
+        initExecutorServer(port, ip, appName, accessToken);
83 83
     }
84 84
     public void destroy(){
85 85
         // destory JobThreadRepository
@@ -118,7 +118,7 @@ public class XxlJobExecutor implements ApplicationContextAware {
118 118
 
119 119
     // ---------------------------------- executor-server ------------------------------------
120 120
     private NetComServerFactory serverFactory = new NetComServerFactory();
121
-    private void initExecutorServer() throws Exception {
121
+    private void initExecutorServer(int port, String ip, String appName, String accessToken) throws Exception {
122 122
         NetComServerFactory.putService(ExecutorBiz.class, new ExecutorBizImpl());   // rpc-service, base on jetty
123 123
         NetComServerFactory.setAccessToken(accessToken);
124 124
         serverFactory.start(port, ip, appName); // jetty + registry