mirror of
https://github.com/miniflux/v2.git
synced 2024-09-28 05:11:51 +02:00
Allow users to disable auto-remove
Adds ARCHIVE_READ_DAYS="-1"
This commit is contained in:
parent
6764a420b0
commit
22b68eefd8
@ -188,6 +188,9 @@ func (s *Storage) UpdateEntries(userID, feedID int64, entries model.Entries, upd
|
||||
|
||||
// ArchiveEntries changes the status of read items to "removed" after specified days.
|
||||
func (s *Storage) ArchiveEntries(days int) error {
|
||||
if days < 0 {
|
||||
return nil
|
||||
}
|
||||
query := fmt.Sprintf(`
|
||||
UPDATE entries SET status='removed'
|
||||
WHERE id=ANY(SELECT id FROM entries WHERE status='read' AND starred is false AND published_at < now () - '%d days'::interval LIMIT 5000)
|
||||
|
Loading…
Reference in New Issue
Block a user