mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
fix: worker-agent cannot specify multiple server issues when registering with the server #1012
This commit is contained in:
parent
0bf95cf419
commit
1383e48fec
@ -12,6 +12,9 @@ import picocli.CommandLine;
|
||||
import picocli.CommandLine.Command;
|
||||
import picocli.CommandLine.Option;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* powerjob-worker-agent entry
|
||||
*
|
||||
@ -56,7 +59,8 @@ public class MainApplication implements Runnable {
|
||||
|
||||
cfg.setAppName(appName);
|
||||
cfg.setPort(port);
|
||||
cfg.setServerAddress(Splitter.on(",").splitToList(server));
|
||||
List<String> servers = new ArrayList<>(Splitter.on(",").splitToList(server));
|
||||
cfg.setServerAddress(servers);
|
||||
cfg.setStoreStrategy(StoreStrategy.MEMORY.name().equals(storeStrategy) ? StoreStrategy.MEMORY : StoreStrategy.DISK);
|
||||
cfg.setMaxResultLength(length);
|
||||
cfg.setTag(tag);
|
||||
|
Loading…
x
Reference in New Issue
Block a user