aboutsummaryrefslogtreecommitdiffhomepage
path: root/service/scheduler
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2019-06-01 18:18:09 -0700
committerGravatar fguillot <fred@miniflux.net>2019-06-02 06:30:08 -0700
commit228862fefaa645026caa483ffe9993bf8c00b22e (patch)
tree2b590dc6cda3e50928a31ce673641357805f75ce /service/scheduler
parent04d85b3c63afcf6c9539fc8dc7a91c4e36c2e8fb (diff)
Refactor config package
- Parse configuration only once during startup time - Store configuration values in a global variable
Diffstat (limited to 'service/scheduler')
-rw-r--r--service/scheduler/scheduler.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/service/scheduler/scheduler.go b/service/scheduler/scheduler.go
index 184bb49..1d51356 100644
--- a/service/scheduler/scheduler.go
+++ b/service/scheduler/scheduler.go
@@ -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) {