mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-03-31 06:24:11 -04:00
remove debug prints
This commit is contained in:
@@ -71,7 +71,6 @@ func RunPing(app *pocketbase.PocketBase) {
|
||||
}(device)
|
||||
}
|
||||
})
|
||||
logger.Debug.Println("CronPing entries:", CronPing.Entries())
|
||||
CronPing.Run()
|
||||
}
|
||||
|
||||
@@ -127,6 +126,5 @@ func RunWakeShutdown(app *pocketbase.PocketBase) {
|
||||
}(device)
|
||||
}
|
||||
}
|
||||
logger.Debug.Println("CronWakeShutdown entries:", CronWakeShutdown.Entries())
|
||||
CronWakeShutdown.Run()
|
||||
}
|
||||
|
||||
@@ -83,14 +83,12 @@ func StartPocketBase(distDirFS fs.FS) {
|
||||
// using this outside App.OnBeforeServe() would not work
|
||||
App.OnModelAfterUpdate().Add(func(e *core.ModelEvent) error {
|
||||
if e.Model.TableName() == "settings" {
|
||||
logger.Debug.Println("restart CronPing")
|
||||
for _, job := range cronjobs.CronPing.Entries() {
|
||||
cronjobs.CronPing.Remove(job.ID)
|
||||
}
|
||||
go cronjobs.RunPing(App)
|
||||
} else if e.Model.TableName() == "devices" {
|
||||
refreshDeviceList()
|
||||
logger.Debug.Println("restart CronWakeShutdown")
|
||||
for _, job := range cronjobs.CronWakeShutdown.Entries() {
|
||||
cronjobs.CronWakeShutdown.Remove(job.ID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user