运维状态,心跳不跟随MpAPP

hdrplus
Matthew 1 year ago
parent 02db142835
commit d38cbbd102

@ -463,9 +463,10 @@ public class MpMasterService extends Service {
mService.startMpApp(); mService.startMpApp();
} else if (TextUtils.equals(MicroPhotoContext.ACTION_HEARTBEAT_MP, action)) { } else if (TextUtils.equals(MicroPhotoContext.ACTION_HEARTBEAT_MP, action)) {
mService.mPreviousMpHbTime = System.currentTimeMillis(); mService.mPreviousMpHbTime = System.currentTimeMillis();
if (!mService.mSeparateNetwork || (mService.mMntnMode || mService.mQuickHbMode)) { if (!mService.mSeparateNetwork && (!mService.mMntnMode)) {
mService.logger.info("Heartbeat Timer Fired By MpAPP ACTION=" + action); mService.logger.info("Heartbeat Timer Fired By MpAPP ACTION=" + action);
long ts = System.currentTimeMillis(); long ts = System.currentTimeMillis();
@ -476,6 +477,7 @@ public class MpMasterService extends Service {
mService.startMaster(true); mService.startMaster(true);
mService.startMpApp(); mService.startMpApp();
} }
} else if (TextUtils.equals(ACTION_UPDATE_CONFIGS, action)) { } else if (TextUtils.equals(ACTION_UPDATE_CONFIGS, action)) {
int restart = intent.getIntExtra("restart", 0); int restart = intent.getIntExtra("restart", 0);
mService.logger.info("Update Config Fired ACTION=" + action + " restart=" + restart); mService.logger.info("Update Config Fired ACTION=" + action + " restart=" + restart);
@ -600,7 +602,7 @@ public class MpMasterService extends Service {
Date dt = new Date(triggerTime); Date dt = new Date(triggerTime);
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
logger.info(String.format("Register HB:" + format.format(dt))); logger.info(String.format("Register HB:" + format.format(dt)) + " MntnMode" + (mMntnMode ? "1" : "0") + " QuickHb=" + (mQuickHbMode ? "1" : "0"));
mPreviousHB = pendingIntent; mPreviousHB = pendingIntent;
mPreviousHeartbeatTime = triggerTime; mPreviousHeartbeatTime = triggerTime;
alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, triggerTime, pendingIntent); alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, triggerTime, pendingIntent);

Loading…
Cancel
Save