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 (
|
var (
|
||||||
itemsKeepSize = 100
|
itemsKeepSize = 50
|
||||||
itemsKeepDays = 90
|
itemsKeepDays = 90
|
||||||
)
|
)
|
||||||
|
|
||||||
// Delete old articles from the database to cleanup space.
|
// Delete old articles from the database to cleanup space.
|
||||||
//
|
//
|
||||||
// The rules:
|
// The rules:
|
||||||
// * Never delete starred entries
|
// * Never delete starred entries.
|
||||||
// * Take each feed capacity (number of entries provided by the feed)
|
// * Keep at least the same amount of articles the feed provides (default: 50).
|
||||||
// into account (see `SetFeedSize`, default: 100).
|
// This prevents from deleting items for rarely updated and/or ever-growing
|
||||||
// This prevents old items from reappearing after the cleanup.
|
// feeds which might eventually reappear as unread.
|
||||||
// * Keep entries for a certain period (default: 90 days).
|
// * Keep entries for a certain period (default: 90 days).
|
||||||
func (s *Storage) DeleteOldItems() {
|
func (s *Storage) DeleteOldItems() {
|
||||||
rows, err := s.db.Query(`
|
rows, err := s.db.Query(`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user