Sleep when feedsWorker starts Instead of pulling feeds on startup
alex wennerberg alex@alexwennerberg.com
Wed, 27 Jan 2021 20:42:01 -0800
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
feed.go
→
feed.go
@@ -19,6 +19,7 @@
func feedsWorker() { log.Println("Starting feeds worker") for { + time.Sleep(time.Hour * 1) users, err := getActiveUserNames() if err != nil { // Handle error somehow@@ -28,7 +29,6 @@ }
for _, user := range users { writeAllFeeds(user) } - time.Sleep(time.Hour * 1) } }