mirror of
https://github.com/miniflux/v2.git
synced 2025-08-16 18:01:37 +00:00
Add functions to get config values
This commit is contained in:
parent
d7f66ffa5c
commit
c2fd2e747a
5 changed files with 72 additions and 12 deletions
|
@ -27,17 +27,17 @@ func Run(cfg *config.Config, store *storage.Storage) {
|
|||
signal.Notify(stop, syscall.SIGTERM)
|
||||
|
||||
feedHandler := feed.NewFeedHandler(store)
|
||||
pool := scheduler.NewWorkerPool(feedHandler, cfg.GetInt("WORKER_POOL_SIZE", config.DefaultWorkerPoolSize))
|
||||
pool := scheduler.NewWorkerPool(feedHandler, cfg.WorkerPoolSize())
|
||||
server := newServer(cfg, store, pool, feedHandler)
|
||||
|
||||
scheduler.NewFeedScheduler(
|
||||
store,
|
||||
pool,
|
||||
cfg.GetInt("POLLING_FREQUENCY", config.DefaultPollingFrequency),
|
||||
cfg.GetInt("BATCH_SIZE", config.DefaultBatchSize),
|
||||
cfg.PollingFrequency(),
|
||||
cfg.BatchSize(),
|
||||
)
|
||||
|
||||
scheduler.NewSessionScheduler(store, config.DefaultSessionCleanupFrequency)
|
||||
scheduler.NewSessionScheduler(store, cfg.SessionCleanupFrequency())
|
||||
|
||||
<-stop
|
||||
logger.Info("Shutting down the server...")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue