修正判断时间

nx2024
Matthew 5 months ago
parent 07c7e17f24
commit d31b388c7a

@ -433,7 +433,7 @@ public class MpMasterService extends Service {
if (mPreviousMpHbTime <= ts && ts - mPreviousMpHbTime > mMpHeartbeatDuration * 2) { if (mPreviousMpHbTime <= ts && ts - mPreviousMpHbTime > mMpHeartbeatDuration * 2) {
// MpApp is not running // MpApp is not running
if (ts - mTimeToStartMpApp >= 30000) { if (ts - mTimeToStartMpApp >= 1800000) { // 30 minutes 30 * 60 * 1000
MicroPhotoContext.restartMpApp(context, "MpMST Keep Alive Detection"); MicroPhotoContext.restartMpApp(context, "MpMST Keep Alive Detection");
mTimeToStartMpApp = ts; mTimeToStartMpApp = ts;
logger.warning("Restart MpAPP as it is NOT Running Prev MPAPP HB=" + logger.warning("Restart MpAPP as it is NOT Running Prev MPAPP HB=" +
@ -455,7 +455,7 @@ public class MpMasterService extends Service {
((ts - modifiedTimeOfPhoto) > mTimeOfMpAppAlive * 4) || ((ts - modifiedTimeOfPhoto) > mTimeOfMpAppAlive * 4) ||
((ts - modifiedTimeOfUpload) > mTimeOfMpAppAlive * 4)) { ((ts - modifiedTimeOfUpload) > mTimeOfMpAppAlive * 4)) {
if (ts - mTimeToStartMpApp >= 30000) { if (ts - mTimeToStartMpApp >= 1800000) { // 30 minutes 30 * 60 * 1000
String msg = "Restart MpAPP as it is NOT Running hb=" + Long.toString(ts - modifiedTimeOfHb) + String msg = "Restart MpAPP as it is NOT Running hb=" + Long.toString(ts - modifiedTimeOfHb) +
" taking=" + Long.toString(ts - modifiedTimeOfPhoto) + " sending=" + Long.toString(ts - modifiedTimeOfUpload) + " taking=" + Long.toString(ts - modifiedTimeOfPhoto) + " sending=" + Long.toString(ts - modifiedTimeOfUpload) +
" Will restart MpApp in " + Long.toString(mDelayedRestartMpTime / 1000) + " seconds"; " Will restart MpApp in " + Long.toString(mDelayedRestartMpTime / 1000) + " seconds";

Loading…
Cancel
Save