aboutsummaryrefslogtreecommitdiff
path: root/internal/feed
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--internal/feed/cache.go2
-rw-r--r--internal/feed/cache_v1.go4
-rw-r--r--internal/feed/parse.go6
3 files changed, 8 insertions, 4 deletions
diff --git a/internal/feed/cache.go b/internal/feed/cache.go
index 0b2f905..f1dfb77 100644
--- a/internal/feed/cache.go
+++ b/internal/feed/cache.go
@@ -25,7 +25,7 @@ type Cache interface {
type CachedFeed interface {
Checked(withFailure bool)
- Failures() uint
+ Failures() int
Last() time.Time
filterItems(items []feeditem, ignoreHash bool, alwaysNew bool) []feeditem
Commit()
diff --git a/internal/feed/cache_v1.go b/internal/feed/cache_v1.go
index 37a4773..5f8c8f4 100644
--- a/internal/feed/cache_v1.go
+++ b/internal/feed/cache_v1.go
@@ -25,7 +25,7 @@ type v1Cache struct {
type cachedFeed struct {
LastCheck time.Time
currentCheck time.Time
- NumFailures uint // can't be named `Failures` b/c it'll collide with the interface
+ NumFailures int // can't be named `Failures` b/c it'll collide with the interface
Items []cachedItem
newItems []cachedItem
}
@@ -67,7 +67,7 @@ func (cf *cachedFeed) Commit() {
cf.LastCheck = cf.currentCheck
}
-func (cf *cachedFeed) Failures() uint {
+func (cf *cachedFeed) Failures() int {
return cf.NumFailures
}
diff --git a/internal/feed/parse.go b/internal/feed/parse.go
index fe3374a..1ce6cda 100644
--- a/internal/feed/parse.go
+++ b/internal/feed/parse.go
@@ -65,6 +65,10 @@ func handleFeed(feed *Feed) {
err := parseFeed(feed)
if err != nil {
- log.Error(err)
+ if feed.cached.Failures() >= feed.Global.MaxFailures {
+ log.Error(err)
+ } else {
+ log.Print(err)
+ }
}
}
sword-store.el?h=1.7.2&id=8fa1be8cdff8f5278011616171d8095b8a46b287&follow=1'>emacs: Release version 1.0.0 of Emacs packageSvend Sorensen2-1/+8 2017-07-26emacs: Use with-editor to wrap "pass edit"Svend Sorensen2-9/+17 2017-04-13Bump version1.7.1Jason A. Donenfeld1-1/+1 2017-04-13init: match only the public keyJason A. Donenfeld1-1/+1 2017-03-28Use $GPG variableJason A. Donenfeld1-3/+3 2017-03-20Fix compatibility with GnuPG 2.2.19Andreas Stieger2-2/+2 2017-03-01tests: fix on OSX by not using the tr hackJason A. Donenfeld3-5/+2 2017-02-26Bump version1.7Jason A. Donenfeld1-1/+1 2017-02-26Modernize makefileJason A. Donenfeld2-31/+36 2017-02-25CopyrightJason A. Donenfeld1-1/+1 2017-02-25StyleJason A. Donenfeld1-2/+2 2017-02-25git: use inner-most directoryJason A. Donenfeld2-27/+48 2017-02-25clip: sleep may require argv[0] to be sleepJason A. Donenfeld1-1/+1 2017-02-25man: document system extensionsJason A. Donenfeld1-2/+3