diff options
author | Frédéric Guillot <fred@miniflux.net> | 2018-06-26 22:55:44 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2018-06-26 23:02:41 -0700 |
commit | dd78fb4340847fc090a6050a39f12582a8ff684d (patch) | |
tree | 23fb0d47f0d1e425b5bb097be7a5337e98c29e6d /storage | |
parent | 45d7105ed15dd80c9fdd76f61cf239b0a6177a4c (diff) |
Do not ignore errored feeds when a user refresh feeds manually
Diffstat (limited to 'storage')
-rw-r--r-- | storage/job.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/storage/job.go b/storage/job.go index 20a0efa..e20a0c4 100644 --- a/storage/job.go +++ b/storage/job.go @@ -30,14 +30,17 @@ func (s *Storage) NewBatch(batchSize int) (jobs model.JobList, err error) { // NewUserBatch returns a serie of jobs but only for a given user. func (s *Storage) NewUserBatch(userID int64, batchSize int) (jobs model.JobList, err error) { defer timer.ExecutionTime(time.Now(), fmt.Sprintf("[Storage:GetUserJobs] batchSize=%d, userID=%d", batchSize, userID)) + + // We do not take the error counter into consideration when the given + // user refresh manually all his feeds to force a refresh. query := ` SELECT id, user_id FROM feeds - WHERE user_id=$1 AND parsing_error_count < $2 + WHERE user_id=$1 ORDER BY checked_at ASC LIMIT %d` - return s.fetchBatchRows(fmt.Sprintf(query, batchSize), userID, maxParsingError) + return s.fetchBatchRows(fmt.Sprintf(query, batchSize), userID) } func (s *Storage) fetchBatchRows(query string, args ...interface{}) (jobs model.JobList, err error) { |