fixed today bug in recur
This commit is contained in:
parent
2bfe631767
commit
545657edf1
|
@ -69,13 +69,13 @@ func Run(inboxProc *process.Inbox, recurProc *process.Recur, logger log.Logger)
|
||||||
}
|
}
|
||||||
case <-recurTicker.C:
|
case <-recurTicker.C:
|
||||||
year, month, day := time.Now().Date()
|
year, month, day := time.Now().Date()
|
||||||
newToday := task.NewDate(year, int(month), day)
|
task.Today = task.NewDate(year, int(month), day)
|
||||||
if oldToday.Equal(newToday) {
|
if oldToday.Equal(task.Today) {
|
||||||
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
oldToday = newToday
|
oldToday = task.NewDate(year, int(month), day)
|
||||||
result, err := recurProc.Process()
|
result, err := recurProc.Process()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.WithErr(err).Error("failed generating recurring tasks")
|
logger.WithErr(err).Error("failed generating recurring tasks")
|
||||||
|
|
Loading…
Reference in New Issue