forked from an/flokati
modules/rss.go: dont exit feed poller on error
This commit is contained in:
parent
b69323fc00
commit
87f2ca8e16
|
@ -57,10 +57,9 @@ func rssPollFeed(uri string, timeout int, cr xmlx.CharsetFunc) {
|
||||||
for {
|
for {
|
||||||
xlog.Info("Polling feed: %s", uri)
|
xlog.Info("Polling feed: %s", uri)
|
||||||
if err := feed.Fetch(uri, cr); err != nil {
|
if err := feed.Fetch(uri, cr); err != nil {
|
||||||
xlog.Info("[e] %s: %s", "*", uri, err)
|
xlog.Error("Feed error: %s: %s", "*", uri, err)
|
||||||
//SayCh <- fmt.Sprintf("%s\n[RSS] Error %s: %s", *rssChannel, uri, err)
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
xlog.Info("Polled %s, next poll in %d seconds", uri, feed.SecondsTillUpdate())
|
||||||
<-time.After(time.Duration(feed.SecondsTillUpdate() * 1e9))
|
<-time.After(time.Duration(feed.SecondsTillUpdate() * 1e9))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue