|
@@ -4,7 +4,7 @@
|
|
|
* @Autor: lishengyin
|
|
|
* @Date: 2021-10-13 09:35:42
|
|
|
* @LastEditors: lishengyin
|
|
|
- * @LastEditTime: 2022-01-13 10:13:53
|
|
|
+ * @LastEditTime: 2022-01-13 14:27:55
|
|
|
*/
|
|
|
#include "user_app.h"
|
|
|
|
|
@@ -100,7 +100,7 @@ namespace MIVA
|
|
|
this->m_manager = Manager::CreateNew();
|
|
|
this->m_deviceState->getDeviceState();
|
|
|
// 查询基础配置
|
|
|
- SqlWriter sqlSelectConfig("SELECT account,outType,outPath,outEnable,ClearType,recordMax,validTime,MemoryThreshold,TempThreshold,FdThreshold FROM MIVA_DB.`MivaConfig`");
|
|
|
+ SqlWriter sqlSelectConfig("SELECT account,outType,outPath,outEnable,ClearType,recordMax,validTime,MemoryThreshold,TempThreshold,FdThreshold,ResetThreshold,ResetSwitch FROM MIVA_DB.`MivaConfig`");
|
|
|
sqlSelectConfig << sqlRet;
|
|
|
for(auto &line : sqlRet)
|
|
|
{
|
|
@@ -114,6 +114,8 @@ namespace MIVA
|
|
|
this->m_manager->setMemoryThreshold(std::atoi(line[7].c_str()));
|
|
|
this->m_manager->setTempThreshold(std::atoi(line[8].c_str()));
|
|
|
this->m_manager->setFdThreshold(std::atoi(line[9].c_str()));
|
|
|
+ this->m_manager->setResetThreshold(std::atoi(line[10].c_str()));
|
|
|
+ this->m_manager->setResetSwitch(std::atoi(line[11].c_str()) ? true : false);
|
|
|
}
|
|
|
|
|
|
// 链接Netty后端
|
|
@@ -347,6 +349,7 @@ namespace MIVA
|
|
|
this->m_Infer->Play = false;
|
|
|
clock_gettime(CLOCK_BOOTTIME, &time3);
|
|
|
WarnL << "释放资源成功,全部所用时间:" << (time3.tv_sec - time1.tv_sec) *1000 + (time3.tv_nsec - time1.tv_nsec)/1000000 << " ms";
|
|
|
+ if(this->m_manager->getResetPower() == OK) this->m_manager->Reset();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -589,7 +592,7 @@ namespace MIVA
|
|
|
getDataTime(ctime);
|
|
|
std::string Ctime = ctime;
|
|
|
|
|
|
- SqlWriter sqlSelectConfig("SELECT account,outType,outPath,outEnable,ClearType,recordMax,validTime,MemoryThreshold,TempThreshold,FdThreshold FROM MIVA_DB.`MivaConfig`");
|
|
|
+ SqlWriter sqlSelectConfig("SELECT account,outType,outPath,outEnable,ClearType,recordMax,validTime,MemoryThreshold,TempThreshold,FdThreshold,ResetThreshold,ResetSwitch FROM MIVA_DB.`MivaConfig`");
|
|
|
sqlSelectConfig << sqlRet;
|
|
|
for(auto &line : sqlRet)
|
|
|
{
|
|
@@ -605,6 +608,8 @@ namespace MIVA
|
|
|
this->m_manager->setMemoryThreshold(std::atoi(line[7].c_str()));
|
|
|
this->m_manager->setTempThreshold(std::atoi(line[8].c_str()));
|
|
|
this->m_manager->setFdThreshold(std::atoi(line[9].c_str()));
|
|
|
+ this->m_manager->setResetThreshold(std::atoi(line[10].c_str()));
|
|
|
+ this->m_manager->setResetSwitch(std::atoi(line[11].c_str()) ? true : false);
|
|
|
}
|
|
|
|
|
|
if(this->m_Infer->enable == false || this->m_InferInfo->DataSources.empty()){
|