fix monapi clean stra

This commit is contained in:
710leo 2020-10-22 11:26:56 +08:00
parent 39fa7e3e17
commit 86929d8f69
3 changed files with 3 additions and 3 deletions

View File

@ -103,7 +103,7 @@ func cleanAggrCalcStra() {
continue
}
if node.Id == 0 {
if node == nil {
logger.Infof("delete aggr_calc stra:%d", stra.Id)
if err := models.AggrCalcDel(stra.Id); err != nil {
logger.Warningf("delete stra: %d, err: %v", stra.Id, err)

View File

@ -217,7 +217,7 @@ func cleanCollect() {
continue
}
if node.Id == 0 {
if node == nil {
logger.Infof("delete collect: %+v", collect)
if err := models.DeleteCollectById(collectType, "sys", id); err != nil {
logger.Warningf("delete collect %s: %d, err: %v", collectType, id, err)

View File

@ -116,7 +116,7 @@ func cleanStra() {
continue
}
if node.Id == 0 {
if node == nil {
logger.Infof("delete stra:%d", stra.Id)
if err := models.StraDel(stra.Id); err != nil {
logger.Warningf("delete stra: %d, err: %v", stra.Id, err)