aboutsummaryrefslogtreecommitdiffstats
path: root/walrss/internal
diff options
context:
space:
mode:
Diffstat (limited to 'walrss/internal')
-rw-r--r--walrss/internal/rss/watcher.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/walrss/internal/rss/watcher.go b/walrss/internal/rss/watcher.go
index f832c12..62f12af 100644
--- a/walrss/internal/rss/watcher.go
+++ b/walrss/internal/rss/watcher.go
@@ -10,9 +10,7 @@ import (
func StartWatcher(st *state.State) {
log.Debug().Str("location", "feed watcher").Msg("starting feed watcher")
go func() {
- currentTime := time.Now().UTC()
-
- timeUntilNextHour := time.Minute * time.Duration(60-currentTime.Minute())
+ timeUntilNextHour := time.Minute * time.Duration(60-time.Now().UTC().Minute())
timeUntilNextHour += 30 * time.Second // little bit of buffer time to
// make sure we're actually going to be within in the new hour
@@ -20,7 +18,7 @@ func StartWatcher(st *state.State) {
time.Sleep(timeUntilNextHour)
- runFeedProcessor(st, currentTime)
+ runFeedProcessor(st, time.Now().UTC())
log.Debug().Str("location", "feed watcher").Msg("starting ticker")