|
@@ -944,7 +944,16 @@ bool CHealthManagerEntity::DoRestart()
|
|
|
}
|
|
|
} while (false);
|
|
|
|
|
|
- DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("DoRestart")("m_maxRestartTimes(%d)",m_maxRestartTimes);
|
|
|
+ do {
|
|
|
+ m_maxLostTimes = 10;
|
|
|
+ int value(0);
|
|
|
+ spConfig->ReadConfigValueInt(GetEntityName(), "MaxLostTimes", value);
|
|
|
+ if (value > 0) {
|
|
|
+ m_maxLostTimes = value;
|
|
|
+ }
|
|
|
+ } while (false);
|
|
|
+
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("m_maxRestartTimes:%d, MaxLostTimes:%d", m_maxRestartTimes, m_maxLostTimes);
|
|
|
|
|
|
defaultTimesMax = 10;
|
|
|
do {
|
|
@@ -1936,12 +1945,20 @@ void CHealthManagerEntity::OnEntityStateHook(const char* pszEntityName, const ch
|
|
|
csResultCode = CSimpleStringA::Format("RTA51%c%c", iByteHigh + 0x30, iByteLow - 10 + 0x41);
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("resultcode:%s", csResultCode.GetData());
|
|
|
DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setLogCode("QLR0402501Z001").setResultCode(csResultCode.GetData())(tmpWarnMsg.GetData());
|
|
|
-
|
|
|
- //doing nothing. HandShake will take it.
|
|
|
- //EntityLostProcTask* task = new EntityLostProcTask(this,pszEntityName);
|
|
|
- //GetFunction()->PostThreadPoolTask(task);
|
|
|
+ m_modRunInfo[pszEntityName].lostCount++;
|
|
|
+ //doing nothing before enter main page. HandShake will take it.
|
|
|
+ if (!m_bEnterMainPageEver && m_modRunInfo[pszEntityName].lostCount < m_maxLostTimes)
|
|
|
+ {
|
|
|
+ EntityLostProcTask* task = new EntityLostProcTask(this, pszEntityName);
|
|
|
+ GetFunction()->PostThreadPoolTask(task);
|
|
|
+ }
|
|
|
}
|
|
|
break;
|
|
|
+ case EntityState_Idle:
|
|
|
+ {
|
|
|
+ if (_strnicmp("Chromium", pszEntityName, strlen("Chromium")) == 0)
|
|
|
+ LogEvent(Severity_Middle, LOG_EVT_SELFCHECK_IEBROWSER_IDLE, "Chromium to idle.");
|
|
|
+ }
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
@@ -2054,7 +2071,6 @@ ErrorCodeEnum CHealthManagerEntity::CheckEntity(const char* pszEntityName, Entit
|
|
|
//oilyang@20230426 ,常规自检时,针对"TerminalStage"做对应处理(自检分常规自检和即时自检)
|
|
|
//"S":准入服务告知准入不过,不再进行实体自检
|
|
|
//非"A":其他启动失败导致进关门页,不再对硬件以及其他没必要自检的实体进行自检
|
|
|
- //oiltmp@20240321 TODO? need to check key entity while in close page?
|
|
|
CSimpleStringA tmpTerminalStage("");
|
|
|
GetFunction()->GetSysVar("TerminalStage", tmpTerminalStage);
|
|
|
if (tmpTerminalStage.Compare("S") == 0)
|