Don't start LeaderInitiator when creating a bean
This commit is contained in:
committed by
Ioannis Canellos
parent
5febe5e440
commit
3ad6fa14e1
@@ -66,14 +66,8 @@ public class LeaderAutoConfiguration {
|
||||
throws UnknownHostException {
|
||||
Candidate candidate = getCandidate(leaderProperties);
|
||||
ScheduledExecutorService scheduledExecutorService = Executors.newSingleThreadScheduledExecutor();
|
||||
LeaderInitiator leaderInitiator =
|
||||
new LeaderInitiator(leaderProperties, leadershipController, candidate, scheduledExecutorService);
|
||||
|
||||
if (leaderInitiator.isAutoStartup()) {
|
||||
leaderInitiator.start();
|
||||
}
|
||||
|
||||
return leaderInitiator;
|
||||
return new LeaderInitiator(leaderProperties, leadershipController, candidate, scheduledExecutorService);
|
||||
}
|
||||
|
||||
private Candidate getCandidate(LeaderProperties leaderProperties) throws UnknownHostException {
|
||||
|
||||
Reference in New Issue
Block a user