diff options
Diffstat (limited to 'internal/api/category.go')
-rw-r--r-- | internal/api/category.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/internal/api/category.go b/internal/api/category.go index 9e13a28f..7b47e2a3 100644 --- a/internal/api/category.go +++ b/internal/api/category.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" @@ -136,7 +137,14 @@ func (h *handler) refreshCategory(w http.ResponseWriter, r *http.Request) { userID := request.UserID(r) categoryID := request.RouteInt64Param(r, "categoryID") - jobs, err := h.store.NewCategoryBatch(userID, categoryID, h.store.CountFeeds(userID)) + batchBuilder := h.store.NewBatchBuilder() + batchBuilder.WithErrorLimit(config.Opts.PollingParsingErrorLimit()) + batchBuilder.WithoutDisabledFeeds() + batchBuilder.WithUserID(userID) + batchBuilder.WithCategoryID(categoryID) + batchBuilder.WithNextCheckExpired() + + jobs, err := batchBuilder.FetchJobs() if err != nil { json.ServerError(w, r, err) return |