Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
fix: rss update on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
boypt committed Jul 14, 2021
1 parent 0a7a73e commit f7fef50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/server_bg.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ func (s *Server) backgroundRoutines() {
// rss updater
go func() {
// skip if not configured
if !strings.HasPrefix(s.engineConfig.RssURL, "http") {
if strings.TrimSpace(s.engineConfig.RssURL) == "" {
return
}

s.updateRSS()
for range time.Tick(30 * time.Minute) {
s.updateRSS()
}
Expand Down
1 change: 1 addition & 0 deletions server/server_rss.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func (s *Server) updateRSS() {
})
if len(s.state.rssCache) > 0 {
s.state.LatestRSSGuid = s.state.rssCache[0].GUID
s.state.Push()
}
}

Expand Down

0 comments on commit f7fef50

Please sign in to comment.