mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
feat: allow user to extend ProcessorFactory
This commit is contained in:
parent
847cf23738
commit
f6a6914f91
@ -32,9 +32,6 @@ public class Address implements Serializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Address{" +
|
return toFullAddress();
|
||||||
"host='" + host + '\'' +
|
|
||||||
", port=" + port +
|
|
||||||
'}';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,12 +9,9 @@ import com.google.common.collect.Maps;
|
|||||||
import com.typesafe.config.Config;
|
import com.typesafe.config.Config;
|
||||||
import com.typesafe.config.ConfigFactory;
|
import com.typesafe.config.ConfigFactory;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import tech.powerjob.common.RemoteConstant;
|
|
||||||
import tech.powerjob.common.serialize.JsonUtils;
|
import tech.powerjob.common.serialize.JsonUtils;
|
||||||
import tech.powerjob.remote.framework.actor.ActorInfo;
|
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.Address;
|
||||||
import tech.powerjob.remote.framework.base.ServerType;
|
|
||||||
import tech.powerjob.remote.framework.cs.CSInitializer;
|
import tech.powerjob.remote.framework.cs.CSInitializer;
|
||||||
import tech.powerjob.remote.framework.cs.CSInitializerConfig;
|
import tech.powerjob.remote.framework.cs.CSInitializerConfig;
|
||||||
import tech.powerjob.remote.framework.transporter.Transporter;
|
import tech.powerjob.remote.framework.transporter.Transporter;
|
||||||
@ -46,6 +43,7 @@ public class AkkaCSInitializer implements CSInitializer {
|
|||||||
this.config = config;
|
this.config = config;
|
||||||
|
|
||||||
Address bindAddress = config.getBindAddress();
|
Address bindAddress = config.getBindAddress();
|
||||||
|
log.info("[PowerJob-AKKA] bindAddress: {}", bindAddress);
|
||||||
|
|
||||||
// 初始化 ActorSystem(macOS上 new ServerSocket 检测端口占用的方法并不生效,可能是AKKA是Scala写的缘故?没办法...只能靠异常重试了)
|
// 初始化 ActorSystem(macOS上 new ServerSocket 检测端口占用的方法并不生效,可能是AKKA是Scala写的缘故?没办法...只能靠异常重试了)
|
||||||
Map<String, Object> overrideConfig = Maps.newHashMap();
|
Map<String, Object> overrideConfig = Maps.newHashMap();
|
||||||
|
@ -193,8 +193,8 @@ public class PowerJobWorker implements ApplicationContextAware, InitializingBean
|
|||||||
List<ProcessorFactory> finalPF = Lists.newArrayList(customPF);
|
List<ProcessorFactory> finalPF = Lists.newArrayList(customPF);
|
||||||
|
|
||||||
// 后置添加2个系统 ProcessorLoader
|
// 后置添加2个系统 ProcessorLoader
|
||||||
finalPF.add(new JarContainerProcessorFactory(runtime));
|
|
||||||
finalPF.add(new BuiltInDefaultProcessorFactory());
|
finalPF.add(new BuiltInDefaultProcessorFactory());
|
||||||
|
finalPF.add(new JarContainerProcessorFactory(runtime));
|
||||||
|
|
||||||
return new PowerJobProcessorLoader(finalPF);
|
return new PowerJobProcessorLoader(finalPF);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user