|
@@ -1784,7 +1784,17 @@ void CHealthManagerEntity::OnEntityStateHook(const char* pszEntityName, const ch
|
|
|
//doing nothing before enter main page. HandShake will take it.
|
|
//doing nothing before enter main page. HandShake will take it.
|
|
|
if (m_bEnterMainPageEver && m_modRunInfo[pszEntityName].lostCount < m_maxLostTimes)
|
|
if (m_bEnterMainPageEver && m_modRunInfo[pszEntityName].lostCount < m_maxLostTimes)
|
|
|
{
|
|
{
|
|
|
- EntityLostProcTask* task = new EntityLostProcTask(this, pszEntityName);
|
|
|
|
|
|
|
+ EntityLostProcTask* task;
|
|
|
|
|
+ //oiltmp@20240415 to be delete after x months
|
|
|
|
|
+ if (_strnicmp("CardIssuer", pszEntityName, strlen("CardIssuer")) == 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (m_sysStaticInfo.strMachineType.Compare("RVC.CardStore") == 0 || m_sysStaticInfo.strMachineType.Compare("RVC.CardPrinter") == 0)
|
|
|
|
|
+ task = new EntityLostProcTask(this, "CardIssuerStore");
|
|
|
|
|
+ else
|
|
|
|
|
+ task = new EntityLostProcTask(this, "CardIssuerStand");
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ task = new EntityLostProcTask(this, pszEntityName);
|
|
|
GetFunction()->PostThreadPoolTask(task);
|
|
GetFunction()->PostThreadPoolTask(task);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1838,7 +1848,22 @@ void CHealthManagerEntity::OnAnswer(CSmartPointer<IAsynWaitSp> pAsynWaitSp)
|
|
|
|
|
|
|
|
if (new_entry->op == Test_ShakeHand && new_entry->ErrorResult != Error_Succeed) {
|
|
if (new_entry->op == Test_ShakeHand && new_entry->ErrorResult != Error_Succeed) {
|
|
|
DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("shake hand %s turns out %s, entity state: %s", (LPCTSTR)new_entry->EntityName, SpStrError(new_entry->ErrorResult), SpStrEntityState((EntityStateEnum)new_entry->state));
|
|
DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("shake hand %s turns out %s, entity state: %s", (LPCTSTR)new_entry->EntityName, SpStrError(new_entry->ErrorResult), SpStrEntityState((EntityStateEnum)new_entry->state));
|
|
|
- ExceptionErrorProcess((const char*)new_entry->EntityName, new_entry->ErrorResult);
|
|
|
|
|
|
|
+ //oiltmp@20240415 to be delete after x months
|
|
|
|
|
+ if (_strnicmp("CardIssuer", new_entry->EntityName.GetData(), strlen("CardIssuer")) == 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (m_sysStaticInfo.strMachineType.Compare("RVC.CardStore") == 0 || m_sysStaticInfo.strMachineType.Compare("RVC.CardPrinter") == 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("ExceptionErrorProcess CardIssuerStore");
|
|
|
|
|
+ ExceptionErrorProcess("CardIssuerStore", new_entry->ErrorResult);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("ExceptionErrorProcess CardIssuerStand");
|
|
|
|
|
+ ExceptionErrorProcess("CardIssuerStand", new_entry->ErrorResult);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ ExceptionErrorProcess((const char*)new_entry->EntityName, new_entry->ErrorResult);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1914,9 +1939,15 @@ ErrorCodeEnum CHealthManagerEntity::CheckEntity(const char* pszEntityName, Entit
|
|
|
if (_strnicmp("CardIssuer", pszEntityName, strlen("CardIssuer")) == 0)
|
|
if (_strnicmp("CardIssuer", pszEntityName, strlen("CardIssuer")) == 0)
|
|
|
{
|
|
{
|
|
|
if (m_sysStaticInfo.strMachineType.Compare("RVC.CardStore") == 0 || m_sysStaticInfo.strMachineType.Compare("RVC.CardPrinter") == 0)
|
|
if (m_sysStaticInfo.strMachineType.Compare("RVC.CardStore") == 0 || m_sysStaticInfo.strMachineType.Compare("RVC.CardPrinter") == 0)
|
|
|
|
|
+ {
|
|
|
errCode = pFuncPrivilege->TestEntity("CardIssuerStore", eTestType, spWait);
|
|
errCode = pFuncPrivilege->TestEntity("CardIssuerStore", eTestType, spWait);
|
|
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("TestEntity CardIssuerStore");
|
|
|
|
|
+ }
|
|
|
else
|
|
else
|
|
|
|
|
+ {
|
|
|
errCode = pFuncPrivilege->TestEntity("CardIssuerStand", eTestType, spWait);
|
|
errCode = pFuncPrivilege->TestEntity("CardIssuerStand", eTestType, spWait);
|
|
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("TestEntity CardIssuerStand");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
errCode = pFuncPrivilege->TestEntity(pszEntityName, eTestType, spWait);
|
|
errCode = pFuncPrivilege->TestEntity(pszEntityName, eTestType, spWait);
|
|
@@ -1978,6 +2009,7 @@ void CHealthManagerEntity::OnSelfCheckTimeout()
|
|
|
}
|
|
}
|
|
|
void CHealthManagerEntity::EntityLostProc(CSimpleStringA entityName)
|
|
void CHealthManagerEntity::EntityLostProc(CSimpleStringA entityName)
|
|
|
{
|
|
{
|
|
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("EntityLostProc %s", entityName.GetData());
|
|
|
CSmartPointer<IEntityFunction> pFunc = GetFunction();
|
|
CSmartPointer<IEntityFunction> pFunc = GetFunction();
|
|
|
CSmartPointer<IEntityFunctionPrivilege> pFuncPrivilege = pFunc.ConvertCase<IEntityFunctionPrivilege>();
|
|
CSmartPointer<IEntityFunctionPrivilege> pFuncPrivilege = pFunc.ConvertCase<IEntityFunctionPrivilege>();
|
|
|
CSmartPointer<IAsynWaitSp> spWait;
|
|
CSmartPointer<IAsynWaitSp> spWait;
|