aboutsummaryrefslogtreecommitdiff
path: root/internal/api/feed.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/feed.go')
-rw-r--r--internal/api/feed.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/internal/api/feed.go b/internal/api/feed.go
index 0f486f70..27f93ab7 100644
--- a/internal/api/feed.go
+++ b/internal/api/feed.go
@@ -9,6 +9,7 @@ import (
"net/http"
"time"
+ "miniflux.app/v2/internal/config"
"miniflux.app/v2/internal/http/request"
"miniflux.app/v2/internal/http/response/json"
"miniflux.app/v2/internal/model"
@@ -69,7 +70,14 @@ func (h *handler) refreshFeed(w http.ResponseWriter, r *http.Request) {
func (h *handler) refreshAllFeeds(w http.ResponseWriter, r *http.Request) {
userID := request.UserID(r)
- jobs, err := h.store.NewUserBatch(userID, h.store.CountFeeds(userID))
+
+ batchBuilder := h.store.NewBatchBuilder()
+ batchBuilder.WithErrorLimit(config.Opts.PollingParsingErrorLimit())
+ batchBuilder.WithoutDisabledFeeds()
+ batchBuilder.WithNextCheckExpired()
+ batchBuilder.WithUserID(userID)
+
+ jobs, err := batchBuilder.FetchJobs()
if err != nil {
json.ServerError(w, r, err)
return