Commits

Zemian Deng committed b32fe38

Change init order: moved schedulerNodeService before pollingScheduleRunner so it can be use during init().

Comments (0)

Files changed (1)

timemachine-scheduler/src/main/java/timemachine/scheduler/SchedulerFactory.java

 
 			DataStore dataStoreService = createSystemService("timemachine.scheduler.dataStore.class", configProps);
 			systemServiceContainer.addDataStoreService(dataStoreService);
+
+			SchedulerNodeService schedulerNodeService = createSchedulerNodeService(systemServiceContainer);
+			systemServiceContainer.addSchedulerNodeService(schedulerNodeService);
 			
 			Map<String, ThreadPool> jobTaskThreadPools = createJobTaskThreadPoolServices(configProps);
 			for (Map.Entry<String, ThreadPool> entry : jobTaskThreadPools.entrySet()) {
 					configProps);
 			systemServiceContainer.addScheduleRunnerService(scheduleRunnerService);
 
-			SchedulerNodeService schedulerNodeService = createSchedulerNodeService(systemServiceContainer);
-			systemServiceContainer.addSchedulerNodeService(schedulerNodeService);
-
 			// Add event history service if enable
 			if (configProps.containsKey("timemachine.scheduler.eventHistory.class")) {
 				EventHistoryService eventHistoryService = createSystemService("timemachine.scheduler.eventHistory.class",