small pixel drawing of a pufferfish vore

add print debugging
Jes Olson j3s@c3f.net
Sat, 20 Apr 2024 20:33:52 -0400
commit

9c259b955ffa7dbe3ebcbff27f6ed00be98ee194

parent

ee4ea779364773059a099a83237a941d3b3cc1cd

2 files changed, 8 insertions(+), 0 deletions(-)

jump to
M reaper/reaper.goreaper/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.gorss/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 {