aboutsummaryrefslogtreecommitdiffhomepage
path: root/config/config.go
diff options
context:
space:
mode:
authorGravatar Jebbs <qjebbs@gmail.com>2018-12-06 12:35:30 +0800
committerGravatar fguillot <fred@miniflux.net>2018-12-05 20:35:30 -0800
commit87648490fda1d765fb7b78544b2b01847550c82b (patch)
treefe57b9c00b0ec311d74af4a55a8db5ee4ce72913 /config/config.go
parent3e392dc3ae7926266f18edbc2a6309cf195cb676 (diff)
Make configurable the number of days to archive read items
Diffstat (limited to 'config/config.go')
-rw-r--r--config/config.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go
index 7ba3a93..99afaef 100644
--- a/config/config.go
+++ b/config/config.go
@@ -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{