|
@@ -1,6 +1,5 @@
|
|
package com.its.rota.server.scheduler;
|
|
package com.its.rota.server.scheduler;
|
|
|
|
|
|
-import com.its.app.common.utils.Elapsed;
|
|
|
|
import com.its.rota.server.config.SchedulingConfig;
|
|
import com.its.rota.server.config.SchedulingConfig;
|
|
import com.its.rota.server.process.dbms.DbmsData;
|
|
import com.its.rota.server.process.dbms.DbmsData;
|
|
import com.its.rota.server.process.dbms.DbmsDataProcess;
|
|
import com.its.rota.server.process.dbms.DbmsDataProcess;
|
|
@@ -33,19 +32,10 @@ public class ApplicationScheduler {
|
|
}
|
|
}
|
|
// 초(0-59) 분(0-59) 시간(0-23) 일(1-31) 월(1-12) 요일(0-6) (0: 일, 1: 월, 2:화, 3:수, 4:목, 5:금, 6:토)
|
|
// 초(0-59) 분(0-59) 시간(0-23) 일(1-31) 월(1-12) 요일(0-6) (0: 일, 1: 월, 2:화, 3:수, 4:목, 5:금, 6:토)
|
|
|
|
|
|
- @Async
|
|
|
|
- @Scheduled(cron = "0 * * * * *") // 1분 주기 작업 실행
|
|
|
|
- public void unitSystSchedule() {
|
|
|
|
-// Elapsed elapsed = new Elapsed();
|
|
|
|
-// log.info("ApplicationScheduler.unitSystSchedule: start.");
|
|
|
|
-// try {
|
|
|
|
-// this.unitSystService.updateUnitSystStts(true);
|
|
|
|
-// log.info("ApplicationScheduler.unitSystSchedule: {}", Elapsed.elapsedTimeStr(elapsed.nanoSeconds()));
|
|
|
|
-// }
|
|
|
|
-// catch(Exception e) {
|
|
|
|
-// log.error("ApplicationScheduler.unitSystSchedule: Exception {}", e.getMessage());
|
|
|
|
-// }
|
|
|
|
- }
|
|
|
|
|
|
+// @Async
|
|
|
|
+// @Scheduled(cron = "0 * * * * *") // 1분 주기 작업 실행
|
|
|
|
+// public void unitSystSchedule() {
|
|
|
|
+// }
|
|
|
|
|
|
@Async
|
|
@Async
|
|
@Scheduled(cron = "${application.scheduler.delete-snd-incident:0/40 3 * * * *}")
|
|
@Scheduled(cron = "${application.scheduler.delete-snd-incident:0/40 3 * * * *}")
|
|
@@ -53,12 +43,9 @@ public class ApplicationScheduler {
|
|
if (!this.config.isUseSndIncident()) {
|
|
if (!this.config.isUseSndIncident()) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- Elapsed elapsed = new Elapsed();
|
|
|
|
- log.info("ApplicationScheduler.deleteSndIncident: start.");
|
|
|
|
try {
|
|
try {
|
|
this.delSndIncident.setCenter(ApplicationRepository.center);
|
|
this.delSndIncident.setCenter(ApplicationRepository.center);
|
|
this.dbmsDataProcess.add(this.delSndIncident);
|
|
this.dbmsDataProcess.add(this.delSndIncident);
|
|
- log.info("ApplicationScheduler.deleteSndIncident: {}", Elapsed.elapsedTimeStr(elapsed.nanoSeconds()));
|
|
|
|
}
|
|
}
|
|
catch(Exception e) {
|
|
catch(Exception e) {
|
|
log.error("ApplicationScheduler.deleteSndIncident: Exception {}", e.getMessage());
|
|
log.error("ApplicationScheduler.deleteSndIncident: Exception {}", e.getMessage());
|
|
@@ -71,12 +58,9 @@ public class ApplicationScheduler {
|
|
if (!this.config.isUseSndLog()) {
|
|
if (!this.config.isUseSndLog()) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- Elapsed elapsed = new Elapsed();
|
|
|
|
- log.info("ApplicationScheduler.deleteSndLog: start.");
|
|
|
|
try {
|
|
try {
|
|
this.delSndLog.setCenter(ApplicationRepository.center);
|
|
this.delSndLog.setCenter(ApplicationRepository.center);
|
|
this.dbmsDataProcess.add(this.delSndLog);
|
|
this.dbmsDataProcess.add(this.delSndLog);
|
|
- log.info("ApplicationScheduler.deleteSndLog: {}", Elapsed.elapsedTimeStr(elapsed.nanoSeconds()));
|
|
|
|
}
|
|
}
|
|
catch(Exception e) {
|
|
catch(Exception e) {
|
|
log.error("ApplicationScheduler.deleteSndLog: Exception {}", e.getMessage());
|
|
log.error("ApplicationScheduler.deleteSndLog: Exception {}", e.getMessage());
|
|
@@ -86,25 +70,19 @@ public class ApplicationScheduler {
|
|
@Async
|
|
@Async
|
|
@Scheduled(cron = "0 * * * * *") // 1분 주기 작업 실행
|
|
@Scheduled(cron = "0 * * * * *") // 1분 주기 작업 실행
|
|
public void checkSendIncident() {
|
|
public void checkSendIncident() {
|
|
-// Elapsed elapsed = new Elapsed();
|
|
|
|
-// log.info("ApplicationScheduler.checkSendIncident: start.");
|
|
|
|
-// try {
|
|
|
|
-// this.itsRotaServerService.checkSendIncident();
|
|
|
|
-// log.info("ApplicationScheduler.checkSendIncident: {}", Elapsed.elapsedTimeStr(elapsed.nanoSeconds()));
|
|
|
|
-// }
|
|
|
|
-// catch(Exception e) {
|
|
|
|
-// log.error("ApplicationScheduler.checkSendIncident: Exception {}", e.getMessage());
|
|
|
|
-// }
|
|
|
|
|
|
+ try {
|
|
|
|
+ this.itsRotaServerService.checkSendIncident();
|
|
|
|
+ }
|
|
|
|
+ catch(Exception e) {
|
|
|
|
+ log.error("ApplicationScheduler.checkSendIncident: Exception {}", e.getMessage());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
@Async
|
|
@Async
|
|
@Scheduled(cron = "0/10 * * * * *") // 10초 주기 작업 실행
|
|
@Scheduled(cron = "0/10 * * * * *") // 10초 주기 작업 실행
|
|
public void checkSendTraffic() {
|
|
public void checkSendTraffic() {
|
|
-// Elapsed elapsed = new Elapsed();
|
|
|
|
-// log.info("ApplicationScheduler.checkSendTraffic: start.");
|
|
|
|
try {
|
|
try {
|
|
- int result = this.itsRotaServerService.checkSendTraffic();
|
|
|
|
-// log.info("ApplicationScheduler.checkSendTraffic: result: {}, {}", result, Elapsed.elapsedTimeStr(elapsed.nanoSeconds()));
|
|
|
|
|
|
+ this.itsRotaServerService.checkSendTraffic();
|
|
}
|
|
}
|
|
catch(Exception e) {
|
|
catch(Exception e) {
|
|
log.error("ApplicationScheduler.checkSendTraffic: Exception {}", e.getMessage());
|
|
log.error("ApplicationScheduler.checkSendTraffic: Exception {}", e.getMessage());
|