|
|
@@ -1,6 +1,7 @@
|
|
|
package com.sig.ggits.etlp.server.scheduler;
|
|
|
|
|
|
import com.its.common.utils.Elapsed;
|
|
|
+import com.sig.ggits.etlp.server.cluster.ClusterConfig;
|
|
|
import com.sig.ggits.etlp.server.config.ApplicationConfig;
|
|
|
import com.sig.ggits.etlp.server.config.SchedulingConfig;
|
|
|
import com.sig.ggits.etlp.server.health.SystemHealthService;
|
|
|
@@ -19,6 +20,7 @@ import org.springframework.stereotype.Component;
|
|
|
public class ApplicationScheduler {
|
|
|
|
|
|
private final ApplicationConfig config;
|
|
|
+ private final ClusterConfig clusterConfig;
|
|
|
private final SchedulingConfig schedulingConfig;
|
|
|
private final GgitsEtlpService service;
|
|
|
private final ProcessStateService processStateService;
|
|
|
@@ -46,7 +48,7 @@ public class ApplicationScheduler {
|
|
|
log.error("ApplicationScheduler.reload(application.yml): Exception {}", e.getMessage());
|
|
|
}
|
|
|
|
|
|
- if (this.schedulingConfig.isGgitsTsinfoEnable()) {
|
|
|
+ if (this.schedulingConfig.isGgitsTsinfoEnable() && this.clusterConfig.isMaster()) {
|
|
|
try {
|
|
|
this.processStateService.updateGgitsTsinfoUnitSystStts(this.schedulingConfig.getGgitsTsinfoProcessId(), this.schedulingConfig.getGgitsTsinfoUrl());
|
|
|
}
|