add print debugging
Jes Olson j3s@c3f.net
Sat, 20 Apr 2024 20:33:52 -0400
2 files changed,
8 insertions(+),
0 deletions(-)
M
reaper/reaper.go
→
reaper/reaper.go
@@ -44,7 +44,9 @@ r.feeds[url] = feed
} for { + log.Println("reaper start: refresh all feeds") r.refreshAllFeeds() + log.Println("reaper end: completed all feeds, sleeping") time.Sleep(15 * time.Minute) } }@@ -69,7 +71,10 @@ // ensure we always free the channel
defer func() { <-semaphore }() + t := time.Now() + log.Printf("reaper feed %s started\n", r.feeds[i].UpdateURL) r.refreshFeed(f) + log.Printf("reaper end: feed %s refreshed, took %s\n", r.feeds[i].UpdateURL, time.Since(t)) }(r.feeds[i]) } }
M
rss/rss.go
→
rss/rss.go
@@ -6,6 +6,7 @@ "errors"
"fmt" "io" "io/ioutil" + "log" "net" "net/http" "strings"@@ -68,6 +69,8 @@ body, err := ioutil.ReadAll(resp.Body)
if err != nil { return nil, err } + + log.Println("rss: ok i got the bytes for this url: " + url) out, err := Parse(body) if err != nil {