1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-11 17:51:01 +00:00

Archive more read entries

This commit is contained in:
Frédéric Guillot 2018-11-25 15:01:01 -08:00
parent f3bff76aa1
commit cb037910df

View file

@ -190,7 +190,7 @@ func (s *Storage) UpdateEntries(userID, feedID int64, entries model.Entries, upd
func (s *Storage) ArchiveEntries() error { func (s *Storage) ArchiveEntries() error {
query := ` query := `
UPDATE entries SET status='removed' UPDATE entries SET status='removed'
WHERE id=ANY(SELECT id FROM entries WHERE status='read' AND starred is false AND published_at < now () - '60 days'::interval LIMIT 500) WHERE id=ANY(SELECT id FROM entries WHERE status='read' AND starred is false AND published_at < now () - '60 days'::interval LIMIT 5000)
` `
if _, err := s.db.Exec(query); err != nil { if _, err := s.db.Exec(query); err != nil {
return fmt.Errorf("unable to archive read entries: %v", err) return fmt.Errorf("unable to archive read entries: %v", err)