mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Rename cleanup config variables
The config parser logs a warning when the user uses a deprecated variable. It also ignores the value from a deprecated variable if it has already been set using the corresponding non-deprecated variable (and logs another warning). - CLEANUP_FREQUENCY_HOURS instead of CLEANUP_FREQUENCY - CLEANUP_ARCHIVE_READ_DAYS instead of ARCHIVE_READ_DAYS
This commit is contained in:
parent
3a60abbac0
commit
fb9a1a6129
4 changed files with 207 additions and 121 deletions
|
@ -16,8 +16,20 @@ import (
|
|||
// Serve starts the internal scheduler.
|
||||
func Serve(store *storage.Storage, pool *worker.Pool) {
|
||||
logger.Info(`Starting scheduler...`)
|
||||
go feedScheduler(store, pool, config.Opts.PollingFrequency(), config.Opts.BatchSize())
|
||||
go cleanupScheduler(store, config.Opts.CleanupFrequency(), config.Opts.ArchiveReadDays(), config.Opts.RemoveSessionsDays())
|
||||
|
||||
go feedScheduler(
|
||||
store,
|
||||
pool,
|
||||
config.Opts.PollingFrequency(),
|
||||
config.Opts.BatchSize(),
|
||||
)
|
||||
|
||||
go cleanupScheduler(
|
||||
store,
|
||||
config.Opts.CleanupFrequencyHours(),
|
||||
config.Opts.CleanupArchiveReadDays(),
|
||||
config.Opts.CleanupRemoveSessionsDays(),
|
||||
)
|
||||
}
|
||||
|
||||
func feedScheduler(store *storage.Storage, pool *worker.Pool, frequency, batchSize int) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue