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:
parent
3e392dc3ae
commit
87648490fd
4 changed files with 28 additions and 9 deletions
|
@ -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{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue