mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Refactor config package
- Parse configuration only once during startup time - Store configuration values in a global variable
This commit is contained in:
parent
04d85b3c63
commit
228862fefa
28 changed files with 922 additions and 624 deletions
|
@ -14,10 +14,10 @@ import (
|
|||
)
|
||||
|
||||
// Serve starts the internal scheduler.
|
||||
func Serve(cfg *config.Config, store *storage.Storage, pool *worker.Pool) {
|
||||
func Serve(store *storage.Storage, pool *worker.Pool) {
|
||||
logger.Info(`Starting scheduler...`)
|
||||
go feedScheduler(store, pool, cfg.PollingFrequency(), cfg.BatchSize())
|
||||
go cleanupScheduler(store, cfg.CleanupFrequency(), cfg.ArchiveReadDays())
|
||||
go feedScheduler(store, pool, config.Opts.PollingFrequency(), config.Opts.BatchSize())
|
||||
go cleanupScheduler(store, config.Opts.CleanupFrequency(), config.Opts.ArchiveReadDays())
|
||||
}
|
||||
|
||||
func feedScheduler(store *storage.Storage, pool *worker.Pool, frequency, batchSize int) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue