Преглед на файлове

feat: allow user to extend ProcessorFactory

tjq преди 2 години
родител
ревизия
f6a6914f91

+ 1 - 4
powerjob-remote/powerjob-remote-framework/src/main/java/tech/powerjob/remote/framework/base/Address.java

@@ -32,9 +32,6 @@ public class Address implements Serializable {
 
     @Override
     public String toString() {
-        return "Address{" +
-                "host='" + host + '\'' +
-                ", port=" + port +
-                '}';
+        return toFullAddress();
     }
 }

+ 1 - 3
powerjob-remote/powerjob-remote-impl-akka/src/main/java/tech/powerjob/remote/akka/AkkaCSInitializer.java

@@ -9,12 +9,9 @@ import com.google.common.collect.Maps;
 import com.typesafe.config.Config;
 import com.typesafe.config.ConfigFactory;
 import lombok.extern.slf4j.Slf4j;
-import tech.powerjob.common.RemoteConstant;
 import tech.powerjob.common.serialize.JsonUtils;
 import tech.powerjob.remote.framework.actor.ActorInfo;
-import tech.powerjob.remote.framework.actor.HandlerInfo;
 import tech.powerjob.remote.framework.base.Address;
-import tech.powerjob.remote.framework.base.ServerType;
 import tech.powerjob.remote.framework.cs.CSInitializer;
 import tech.powerjob.remote.framework.cs.CSInitializerConfig;
 import tech.powerjob.remote.framework.transporter.Transporter;
@@ -46,6 +43,7 @@ public class AkkaCSInitializer implements CSInitializer {
         this.config = config;
 
         Address bindAddress = config.getBindAddress();
+        log.info("[PowerJob-AKKA] bindAddress: {}", bindAddress);
 
         // 初始化 ActorSystem(macOS上 new ServerSocket 检测端口占用的方法并不生效,可能是AKKA是Scala写的缘故?没办法...只能靠异常重试了)
         Map<String, Object> overrideConfig = Maps.newHashMap();

+ 1 - 1
powerjob-worker/src/main/java/tech/powerjob/worker/PowerJobWorker.java

@@ -193,8 +193,8 @@ public class PowerJobWorker implements ApplicationContextAware, InitializingBean
         List<ProcessorFactory> finalPF = Lists.newArrayList(customPF);
 
         // 后置添加2个系统 ProcessorLoader
-        finalPF.add(new JarContainerProcessorFactory(runtime));
         finalPF.add(new BuiltInDefaultProcessorFactory());
+        finalPF.add(new JarContainerProcessorFactory(runtime));
 
         return new PowerJobProcessorLoader(finalPF);
     }