summaryrefslogtreecommitdiff
path: root/internal/model
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-10 08:54:24 +0300
committerPaul Buetow <paul@buetow.org>2026-05-10 08:54:24 +0300
commit297a2f4e2f0aba6f139736030a7845e0d91e5856 (patch)
tree3b0b8580c278321222afecdb4794d75dd78d8576 /internal/model
parent470cdf9833cdd83e9ea357f2831a5490ba081508 (diff)
Add circuit breaker / backoff for failing podcast feeds in CheckFeeds
- DB: add consecutive_failures and next_check_at to podcast_feeds - model: add ConsecutiveFailures and NextCheckAt to PodcastFeed struct - repository: update CRUD queries to handle new columns and ListFeedsNeedingCheck to skip feeds with future next_check_at - service: update CheckFeeds to use new query, update checkFeed to reset counters on success and increment exponential backoff on failure - tests: adapt mock signatures, add backoff integration test
Diffstat (limited to 'internal/model')
-rw-r--r--internal/model/podcast.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/model/podcast.go b/internal/model/podcast.go
index 8b5c3a2..f0b016d 100644
--- a/internal/model/podcast.go
+++ b/internal/model/podcast.go
@@ -15,6 +15,8 @@ type PodcastFeed struct {
LastETag string `json:"last_etag"`
CheckIntervalMinutes int `json:"check_interval_minutes"`
AutoDownload bool `json:"auto_download"`
+ ConsecutiveFailures int `json:"consecutive_failures"`
+ NextCheckAt *time.Time `json:"next_check_at"`
CreatedAt time.Time `json:"created_at"`
}