11-25
This commit is contained in:
parent
0347e649d8
commit
822745e066
@ -714,7 +714,18 @@ void JsonData::DataNodeStatusCheck() {
|
||||
}
|
||||
if (count == nSize && nodeOnline && count != 0) {
|
||||
zlog_error(zct, "ALL Node offline,count = %d", count);
|
||||
exit(0);
|
||||
char whereCon[64]={0};
|
||||
sprintf(whereCon,"DATE(timestamp, 'unixepoch') = DATE('now') ORDER BY timeStamp DESC limit 0,1");
|
||||
std::string strCount = sqlite_db_ctrl::instance().GetData(" reboot_record ", "count", whereCon);
|
||||
if (atoi(strCount.c_str()) < 3)//当天大于三次不再重启进程
|
||||
{
|
||||
char insertSql[64] = {0};
|
||||
sprintf(insertSql, "'%s',%d,'%s'",localtimestamp,atoi(strCount.c_str())+1,"ALL Node offline");
|
||||
sqlite_db_ctrl::instance().InsertData(" reboot_record ", insertSql);
|
||||
exit(0);
|
||||
}else{
|
||||
zlog_warn(zct, "reboot now count = %d",atoi(strCount.c_str()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user