载入监控定时采集

This commit is contained in:
TsMask
2023-08-17 10:38:32 +08:00
parent 55ccfa8133
commit 18149365ab
2 changed files with 8 additions and 5 deletions

View File

@@ -186,11 +186,10 @@ func loadNetIO() {
}
}
rows, err := dborm.DbClient.XEngine.Table("monitor_network").Insert(netList)
_, err := dborm.DbClient.XEngine.Table("monitor_network").Insert(netList)
if err != nil {
log.Errorf("Insert network monitoring data failed, err: %v", err)
}
fmt.Println(rows, err)
}
var c *cron.Cron
@@ -198,6 +197,7 @@ var monitorCronID int
func init() {
c = cron.New()
c.Start()
monitorCronID = 0
}