refactor: do some internal refactor.
This commit is contained in:
parent
883b1b79a2
commit
989c20078a
|
@ -411,7 +411,7 @@ void mndDoTimerPullupTask(SMnode *pMnode, int64_t sec) {
|
|||
mndStreamConsensusChkpt(pMnode);
|
||||
}
|
||||
|
||||
if (sec % 20 == (TMIN(86400, (20 - 1)))) {
|
||||
if (sec % tsTelemInterval == (TMIN(86400, (tsTelemInterval - 1)))) {
|
||||
mndPullupTelem(pMnode);
|
||||
}
|
||||
|
||||
|
|
|
@ -97,6 +97,7 @@ static void mndBuildRuntimeInfo(SMnode* pMnode, SJson* pJson) {
|
|||
|
||||
mndRetrieveAlgoList(pMnode, pFcList, pAdList);
|
||||
|
||||
if (taosArrayGetSize(pFcList) > 0) {
|
||||
SJson* items = tjsonAddArrayToObject(pJson, "forecast");
|
||||
TSDB_CHECK_NULL(items, code, lino, _OVER, terrno);
|
||||
|
||||
|
@ -110,7 +111,9 @@ static void mndBuildRuntimeInfo(SMnode* pMnode, SJson* pJson) {
|
|||
TSDB_CHECK_NULL(p, code, lino, _OVER, terrno);
|
||||
TAOS_CHECK_GOTO(tjsonAddStringToObject(item, "name", p->name), &lino, _OVER);
|
||||
}
|
||||
}
|
||||
|
||||
if (taosArrayGetSize(pAdList) > 0) {
|
||||
SJson* items1 = tjsonAddArrayToObject(pJson, "anomaly_detection");
|
||||
TSDB_CHECK_NULL(items1, code, lino, _OVER, terrno);
|
||||
|
||||
|
@ -124,6 +127,7 @@ static void mndBuildRuntimeInfo(SMnode* pMnode, SJson* pJson) {
|
|||
TSDB_CHECK_NULL(p, code, lino, _OVER, terrno);
|
||||
TAOS_CHECK_GOTO(tjsonAddStringToObject(item, "name", p->name), &lino, _OVER);
|
||||
}
|
||||
}
|
||||
|
||||
_OVER:
|
||||
taosArrayDestroy(pFcList);
|
||||
|
|
Loading…
Reference in New Issue