reset : local/master
This commit is contained in:
parent
a573682700
commit
2c4d7f3b2c
@ -44,7 +44,7 @@ public class SchedulerUtil {
|
||||
@Resource (name = "KakaoAtSendService")
|
||||
private KakaoAtSendService kakaoAtSendService;
|
||||
|
||||
private static final String TWO_MIN = "PT2M"; // 2분동안 LOCK
|
||||
private static final String ONE_MIN = "PT1M"; // 1분동안 LOCK
|
||||
|
||||
//로컬 테스트용 아이피 허용
|
||||
private String myLocalIp = "192.168.0.40";
|
||||
@ -62,8 +62,10 @@ public class SchedulerUtil {
|
||||
private String containerIp = "172.25.0.2";
|
||||
|
||||
//10분마다 실행
|
||||
@Scheduled(cron = "0 0/2 * * * *")
|
||||
@SchedulerLock(name = "kakaoAtSendPrcs", lockAtMostForString = TWO_MIN, lockAtLeastForString = TWO_MIN)
|
||||
// @Scheduled(cron = "0 0/1 * * * *")
|
||||
//1분마다 실행
|
||||
@Scheduled(cron = "0 0/1 * * * *")
|
||||
// @SchedulerLock(name = "kakaoAtSendPrcs", lockAtMostForString = ONE_MIN, lockAtLeastForString = ONE_MIN)
|
||||
public void kakaoAtSendPrcs() throws Exception {
|
||||
System.out.println("===========at scheduler run============");
|
||||
log.error("===========at scheduler run============");
|
||||
@ -95,7 +97,8 @@ public class SchedulerUtil {
|
||||
log.error("server ip ============" + hostAddr);
|
||||
|
||||
|
||||
if(hostAddr.equals(myLocalIp) || hostAddr.equals(devOutIp) || hostAddr.equals(devInIp) || hostAddr.equals(dmzIp1) || hostAddr.equals(dmzIp2) || hostAddr.equals(containerIp) ) {
|
||||
// if(hostAddr.equals(myLocalIp) || hostAddr.equals(devOutIp) || hostAddr.equals(devInIp) || hostAddr.equals(dmzIp1) || hostAddr.equals(dmzIp2) || hostAddr.equals(containerIp) ) {
|
||||
if(hostAddr.equals(containerIp) ) {
|
||||
//접속 서버 별 분기처리 필요
|
||||
|
||||
List<KakaoAtSendVO> list = kakaoAtSendService.selectKakaoAtList();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user