mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Avoid excessive manual polling with default scheduler
This commit is contained in:
parent
54eb500315
commit
cc44d14722
7 changed files with 40 additions and 15 deletions
|
@ -38,7 +38,7 @@ func (s *Storage) NewUserBatch(userID int64, batchSize int) (jobs model.JobList,
|
|||
FROM
|
||||
feeds
|
||||
WHERE
|
||||
user_id=$1 AND disabled is false
|
||||
user_id=$1 AND disabled is false AND next_check_at < now()
|
||||
ORDER BY next_check_at ASC LIMIT %d
|
||||
`
|
||||
return s.fetchBatchRows(fmt.Sprintf(query, batchSize), userID)
|
||||
|
@ -55,7 +55,7 @@ func (s *Storage) NewCategoryBatch(userID int64, categoryID int64, batchSize int
|
|||
FROM
|
||||
feeds
|
||||
WHERE
|
||||
user_id=$1 AND category_id=$2 AND disabled is false
|
||||
user_id=$1 AND category_id=$2 AND disabled is false AND next_check_at < now()
|
||||
ORDER BY next_check_at ASC LIMIT %d
|
||||
`
|
||||
return s.fetchBatchRows(fmt.Sprintf(query, batchSize), userID, categoryID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue