diff --git a/modules/rss/rss.go b/modules/rss/rss.go index 0de2040..fde7cbc 100644 --- a/modules/rss/rss.go +++ b/modules/rss/rss.go @@ -31,7 +31,6 @@ func Init(ch chan string, path string) { } defer file.Close() scanner := bufio.NewScanner(file) - <-time.After(60 * time.Second) for scanner.Scan() { go PollFeed(scanner.Text(), 5, charsetReader) } @@ -48,7 +47,7 @@ func PollFeed(uri string, timeout int, cr xmlx.CharsetFunc) { log.Printf("Polling feed: %s", uri) if err := feed.Fetch(uri, cr); err != nil { log.Printf("[e] %s: %s", "*", uri, err) - //sayCh <- fmt.Sprintf("%s\n[e] %s: %s", "*", uri, err) + sayCh <- fmt.Sprintf("%s\n*** [RSS] Error %s: %s", "*", uri, err) return } <-time.After(time.Duration(feed.SecondsTillUpdate() * 1e9)) @@ -56,7 +55,7 @@ func PollFeed(uri string, timeout int, cr xmlx.CharsetFunc) { } func chanHandler(feed *gorss.Feed, newchannels []*gorss.Channel) { - //sayCh <- fmt.Sprintf("%s\n%d new channel(s) in %s", "*", len(newchannels), feed.Url) + sayCh <- fmt.Sprintf("%s\n*** [RSS] %d new channel(s) in %s", "*", len(newchannels), feed.Url) } func itemHandler(feed *gorss.Feed, ch *gorss.Channel, newitems []*gorss.Item) {