mirror of
https://github.com/Xevion/go-ha.git
synced 2025-12-06 01:15:10 -06:00
Added daily schedule test. Migrated relevant files to slog.
This commit is contained in:
@@ -2,7 +2,7 @@ package gomeassistant
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"log/slog"
|
||||
"time"
|
||||
|
||||
"github.com/golang-module/carbon"
|
||||
@@ -168,7 +168,7 @@ func runSchedules(a *App) {
|
||||
sched = popSchedule(a)
|
||||
}
|
||||
|
||||
log.Println("Next schedule:", sched.nextRunTime)
|
||||
slog.Info("Next schedule", "new run time", sched.nextRunTime)
|
||||
time.Sleep(time.Until(sched.nextRunTime))
|
||||
sched.maybeRunCallback(a)
|
||||
requeueSchedule(a, sched)
|
||||
|
||||
Reference in New Issue
Block a user