small pixel drawing of a pufferfish vore

Revert "only write feedfetcherror if changed"

This reverts commit ccc2f91587c85d84e2bbfec85a7e40040dc8427f.
Jes Olson j3s@c3f.net
Mon, 20 Mar 2023 19:42:55 -0700
commit

8a4a8a6fcfc3b5e56e1c453f2c81770161746f0f

parent

ccc2f91587c85d84e2bbfec85a7e40040dc8427f

2 files changed, 1 insertions(+), 18 deletions(-)

jump to
M reaper/reaper.goreaper/reaper.go

@@ -85,16 +85,8 @@

// updateFeed triggers a fetch on the given feed, // and sets a fetch error in the db if there is one. func (r *Reaper) updateFeed(f *rss.Feed) { - var currentErr string err := f.Update() - if err != nil { - currentErr = err.Error() - } - - storedErr := r.db.GetFeedFetchError(f.UpdateURL) - if currentErr != storedErr { - r.db.SetFeedFetchError(f.UpdateURL, err) - } + r.db.SetFeedFetchError(f.UpdateURL, err) } // Have checks whether a given url is represented
M sqlite/sql.gosqlite/sql.go

@@ -219,12 +219,3 @@ if err != nil {

panic(err) } } - -func (s *DB) GetFeedFetchError(url string) string { - var fetchErr string - err := s.sql.QueryRow(`SELECT fetch_error FROM feed WHERE url=?`, url).Scan(&fetchErr) - if err != nil { - panic(err) - } - return fetchErr -}