aboutsummaryrefslogtreecommitdiff
path: root/internal/feed
diff options
context:
space:
mode:
Diffstat (limited to 'internal/feed')
-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)
+ }
}
}
git/commit/src/password-store.sh?h=1.7.1&id=b5f828c87e7074c6bb52ac243ac19b735419b5ac&follow=1'>Remember to prune empty folders.Jason A. Donenfeld1-0/+8 2014-04-18init: allow deinitializationJason A. Donenfeld2-2/+18 2014-04-18bash-completion: filter dot files from resultsJason A. Donenfeld1-3/+8 2014-04-18reencrypt: remove option, do automaticallyJason A. Donenfeld5-39/+25 2014-04-18reencryption: add to completion filesJason A. Donenfeld3-1/+5 2014-04-18Specify variable gpg.Jason A. Donenfeld1-1/+1 2014-04-18style: don't escape new line on &&Jason A. Donenfeld1-2/+2 2014-04-18reencryption: remove temporary file on failureJason A. Donenfeld1-1/+1 2014-04-18reencryption: only reencrypt files when requiredJason A. Donenfeld2-16/+37 2014-04-17cp: typo as cvJason A. Donenfeld1-1/+1 2014-04-17bash: gpg_id is localJason A. Donenfeld1-0/+1 2014-04-17move/copy: always reencrypt passwords at destinationJason A. Donenfeld5-25/+56 2014-04-17makefile: allow platform files with gnu sedJason A. Donenfeld1-7/+8 2014-04-17mv: Add pass mv/rename supportJason A. Donenfeld5-3/+78 2014-04-17revelation2pass: add plain XML importJavali1-11/+15 2014-04-17platform: add cygwin supportJason A. Donenfeld2-1/+17