mirror of
https://github.com/davegallant/rfd-fyi.git
synced 2025-08-15 12:10:19 +00:00
Compare commits
2 Commits
c8bde77643
...
9b583c5fe0
Author | SHA1 | Date | |
---|---|---|---|
|
9b583c5fe0 | ||
|
5dd59be6aa |
@@ -91,12 +91,15 @@ func (a *App) refreshTopics() {
|
||||
for {
|
||||
log.Info().Msg("Refreshing topics")
|
||||
latestTopics := a.getDeals(9, 1, 6)
|
||||
latestTopics = a.updateScores(latestTopics)
|
||||
|
||||
log.Info().Msg("Refreshing redirects")
|
||||
latestRedirects := a.getRedirects()
|
||||
a.Redirects = latestRedirects
|
||||
a.CurrentTopics = a.stripRedirects(latestTopics)
|
||||
if len(latestTopics) > 0 {
|
||||
latestTopics = a.updateScores(latestTopics)
|
||||
|
||||
log.Info().Msg("Refreshing redirects")
|
||||
latestRedirects := a.getRedirects()
|
||||
a.Redirects = latestRedirects
|
||||
a.CurrentTopics = a.stripRedirects(latestTopics)
|
||||
}
|
||||
|
||||
a.LastRefresh = time.Now()
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
|
Reference in New Issue
Block a user