1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Add feature to refresh all feeds from the user interface

This commit is contained in:
Frédéric Guillot 2017-11-21 22:36:00 -08:00
parent 480b0d94e2
commit 855fb06bc9
19 changed files with 104 additions and 55 deletions

22
main.go
View file

@ -44,21 +44,15 @@ func run(cfg *config.Config, store *storage.Storage) {
signal.Notify(stop, os.Interrupt)
feedHandler := feed.NewFeedHandler(store)
server := server.NewServer(cfg, store, feedHandler)
pool := scheduler.NewWorkerPool(feedHandler, cfg.GetInt("WORKER_POOL_SIZE", config.DefaultWorkerPoolSize))
server := server.NewServer(cfg, store, pool, feedHandler)
go func() {
pool := scheduler.NewWorkerPool(
feedHandler,
cfg.GetInt("WORKER_POOL_SIZE", config.DefaultWorkerPoolSize),
)
scheduler.NewScheduler(
store,
pool,
cfg.GetInt("POLLING_FREQUENCY", config.DefaultPollingFrequency),
cfg.GetInt("BATCH_SIZE", config.DefaultBatchSize),
)
}()
scheduler.NewScheduler(
store,
pool,
cfg.GetInt("POLLING_FREQUENCY", config.DefaultPollingFrequency),
cfg.GetInt("BATCH_SIZE", config.DefaultBatchSize),
)
<-stop
log.Println("Shutting down the server...")