|
|
|
@ -1,6 +1,8 @@
|
|
|
|
package com.nm.gsgl.service.impl;
|
|
|
|
package com.nm.gsgl.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
|
|
|
|
import com.nm.gsgl.common.Constant;
|
|
|
|
|
|
|
|
import com.nm.gsgl.common.utils.DateTimeUtil;
|
|
|
|
import com.nm.gsgl.common.utils.LogUtil;
|
|
|
|
import com.nm.gsgl.common.utils.LogUtil;
|
|
|
|
import com.nm.gsgl.entity.intermediary.AppAliveStatus;
|
|
|
|
import com.nm.gsgl.entity.intermediary.AppAliveStatus;
|
|
|
|
import com.nm.gsgl.mapper.AppAliveStatusMapper;
|
|
|
|
import com.nm.gsgl.mapper.AppAliveStatusMapper;
|
|
|
|
@ -116,4 +118,21 @@ public class MinDualMachineServiceImpl implements MinDualMachineService {
|
|
|
|
LogUtil.WriteLog_MinFee("[uuid:" + uuid + "]-当前活跃的机器为" +appAliveStatus.getALiveId()+"不是ALIVEID=2的程序,更新主程序存活时间,程序休眠,等待下次轮询", "MinDualMachineServiceImpl");
|
|
|
|
LogUtil.WriteLog_MinFee("[uuid:" + uuid + "]-当前活跃的机器为" +appAliveStatus.getALiveId()+"不是ALIVEID=2的程序,更新主程序存活时间,程序休眠,等待下次轮询", "MinDualMachineServiceImpl");
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
|
|
|
Date date = new Date();
|
|
|
|
|
|
|
|
Date mTime = DateTimeUtil.getFormatDate("2024-10-10 10:25:00", Constant.YYYY_MM_DD_HH_MM_SS);
|
|
|
|
|
|
|
|
long time = date.getTime();
|
|
|
|
|
|
|
|
long time1 = mTime.getTime();
|
|
|
|
|
|
|
|
int deadCount =5;
|
|
|
|
|
|
|
|
int deadTime = 300;
|
|
|
|
|
|
|
|
System.out.println( time1);
|
|
|
|
|
|
|
|
System.out.println(((long) deadTime * deadCount * 1000));
|
|
|
|
|
|
|
|
System.out.println( time1+((long) deadTime * deadCount * 1000));
|
|
|
|
|
|
|
|
System.out.println( time);
|
|
|
|
|
|
|
|
System.out.println((time1 + ((long) deadTime * deadCount * 1000) - time));
|
|
|
|
|
|
|
|
System.out.println((time1 + ((long) deadTime * deadCount * 1000) < time));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|