1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

Make configurable the number of days to archive read items

This commit is contained in:
Jebbs 2018-12-06 12:35:30 +08:00 committed by fguillot
parent 3e392dc3ae
commit 87648490fd
4 changed files with 28 additions and 9 deletions

View file

@ -21,6 +21,7 @@ const (
defaultBatchSize = 10
defaultDatabaseMaxConns = 20
defaultDatabaseMinConns = 1
defaultArchiveReadDays = 60
defaultListenAddr = "127.0.0.1:8080"
defaultCertFile = ""
defaultKeyFile = ""
@ -224,6 +225,11 @@ func (c *Config) HasSchedulerService() bool {
return !getBooleanValue("DISABLE_SCHEDULER_SERVICE")
}
// ArchiveReadDays returns the number of days after which marking read items as removed.
func (c *Config) ArchiveReadDays() int {
return getIntValue("ARCHIVE_READ_DAYS", defaultArchiveReadDays)
}
// NewConfig returns a new Config.
func NewConfig() *Config {
cfg := &Config{