feat: allow user to extend ProcessorFactory

This commit is contained in:
tjq 2023-01-20 16:06:03 +08:00
parent 847cf23738
commit f6a6914f91
3 changed files with 3 additions and 8 deletions

View File

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

View File

@ -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);
// 初始化 ActorSystemmacOS上 new ServerSocket 检测端口占用的方法并不生效可能是AKKA是Scala写的缘故没办法...只能靠异常重试了
Map<String, Object> overrideConfig = Maps.newHashMap();

View File

@ -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);
}