mirror of
https://github.com/gazer-x/komari.git
synced 2026-06-22 00:05:52 +08:00
refactor: 移动 PingSchedule 相关逻辑
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/komari-monitor/komari/internal/database/dbcore"
|
||||
"github.com/komari-monitor/komari/internal/database/models"
|
||||
"github.com/komari-monitor/komari/pkg/utils"
|
||||
"github.com/komari-monitor/komari/internal/pingSchedule"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@@ -90,7 +90,7 @@ func ReloadPingSchedule() error {
|
||||
if err := db.Find(&pingTasks).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
return utils.ReloadPingSchedule(pingTasks)
|
||||
return pingSchedule.ReloadPingSchedule(pingTasks)
|
||||
}
|
||||
|
||||
func GetPingRecords(uuid string, taskId int, start, end time.Time) ([]models.PingRecord, error) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package utils
|
||||
package pingSchedule
|
||||
|
||||
import (
|
||||
"context"
|
||||
Reference in New Issue
Block a user