cleanup todos that are done

This commit is contained in:
Sam Lewis
2022-10-17 12:37:36 -04:00
parent b92147a6a6
commit ccd6805d40
3 changed files with 5 additions and 7 deletions
+2 -3
View File
@@ -67,9 +67,8 @@ func (a *app) RegisterSchedule(s schedule) {
log.Fatalln("A schedule must call either Daily() or Every() when built.")
}
// TODO: consider moving all time stuff to carbon?
now := time.Now()
startTime := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, now.Location()) // start at midnight today
startTime := carbon.Now().StartOfDay().Carbon2Time()
// apply offset if set
if s.offset.Minutes() > 0 {
startTime = startTime.Add(s.offset)
@@ -81,7 +80,7 @@ func (a *app) RegisterSchedule(s schedule) {
}
s.realStartTime = startTime
a.schedules.Insert(s, float64(startTime.Unix())) // TODO: this blows up because schedule can't be used as key for map in prio queue lib. Just copy/paste and tweak as needed
a.schedules.Insert(s, float64(startTime.Unix()))
}
func (a *app) RegisterEntityListener(el entityListener) {