mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
feat: suit PowerJobAutoConfiguration for new properties
This commit is contained in:
parent
3892c38785
commit
5a14b300f9
@ -58,6 +58,7 @@ public class PowerJobAutoConfiguration {
|
||||
*/
|
||||
config.setAppName(worker.getAppName());
|
||||
config.setServerAddress(serverAddress);
|
||||
config.setProtocol(worker.getProtocol());
|
||||
/*
|
||||
* For non-Map/MapReduce tasks, {@code memory} is recommended for speeding up calculation.
|
||||
* Map/MapReduce tasks may produce batches of subtasks, which could lead to OutOfMemory
|
||||
@ -82,7 +83,7 @@ public class PowerJobAutoConfiguration {
|
||||
|
||||
config.setHealthReportInterval(worker.getHealthReportInterval());
|
||||
/*
|
||||
* Create OhMyWorker object and set properties.
|
||||
* Create PowerJobSpringWorker object and set properties.
|
||||
*/
|
||||
return new PowerJobSpringWorker(config);
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package tech.powerjob.worker.autoconfigure;
|
||||
|
||||
import tech.powerjob.common.RemoteConstant;
|
||||
import tech.powerjob.common.enums.Protocol;
|
||||
import tech.powerjob.worker.common.constants.StoreStrategy;
|
||||
import tech.powerjob.worker.core.processor.ProcessResult;
|
||||
import tech.powerjob.worker.core.processor.WorkflowContext;
|
||||
@ -125,6 +126,10 @@ public class PowerJobProperties {
|
||||
* </p>
|
||||
*/
|
||||
private String serverAddress;
|
||||
/**
|
||||
* Protocol for communication between WORKER and server
|
||||
*/
|
||||
private Protocol protocol = Protocol.AKKA;
|
||||
/**
|
||||
* Local store strategy for H2 database. {@code disk} or {@code memory}.
|
||||
*/
|
||||
|
@ -38,7 +38,7 @@ public class OmsJarContainer implements OmsContainer {
|
||||
private OhMyClassLoader containerClassLoader;
|
||||
private ClassPathXmlApplicationContext container;
|
||||
|
||||
private Map<String, BasicProcessor> processorCache = Maps.newConcurrentMap();
|
||||
private final Map<String, BasicProcessor> processorCache = Maps.newConcurrentMap();
|
||||
|
||||
public OmsJarContainer(Long containerId, String name, String version, File localJarFile) {
|
||||
this.containerId = containerId;
|
||||
|
Loading…
x
Reference in New Issue
Block a user