mirror of
https://github.com/nkanaev/yarr.git
synced 2025-05-24 00:33:14 +00:00
update
This commit is contained in:
parent
fbd0b2310e
commit
954b549029
@ -293,17 +293,17 @@ func (s *Storage) SyncSearch() {
|
||||
}
|
||||
|
||||
var (
|
||||
itemsKeepSize = 100
|
||||
itemsKeepSize = 50
|
||||
itemsKeepDays = 90
|
||||
)
|
||||
|
||||
// Delete old articles from the database to cleanup space.
|
||||
//
|
||||
// The rules:
|
||||
// * Never delete starred entries
|
||||
// * Take each feed capacity (number of entries provided by the feed)
|
||||
// into account (see `SetFeedSize`, default: 100).
|
||||
// This prevents old items from reappearing after the cleanup.
|
||||
// * Never delete starred entries.
|
||||
// * Keep at least the same amount of articles the feed provides (default: 50).
|
||||
// This prevents from deleting items for rarely updated and/or ever-growing
|
||||
// feeds which might eventually reappear as unread.
|
||||
// * Keep entries for a certain period (default: 90 days).
|
||||
func (s *Storage) DeleteOldItems() {
|
||||
rows, err := s.db.Query(`
|
||||
|
Loading…
x
Reference in New Issue
Block a user