1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-22 17:18:37 +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

View file

@ -9,19 +9,21 @@ import (
"net/http"
"time"
"github.com/miniflux/miniflux2/scheduler"
"github.com/miniflux/miniflux2/config"
"github.com/miniflux/miniflux2/reader/feed"
"github.com/miniflux/miniflux2/storage"
)
// NewServer returns a new HTTP server.
func NewServer(cfg *config.Config, store *storage.Storage, feedHandler *feed.Handler) *http.Server {
func NewServer(cfg *config.Config, store *storage.Storage, pool *scheduler.WorkerPool, feedHandler *feed.Handler) *http.Server {
server := &http.Server{
ReadTimeout: 5 * time.Second,
WriteTimeout: 10 * time.Second,
IdleTimeout: 60 * time.Second,
Addr: cfg.Get("LISTEN_ADDR", config.DefaultListenAddr),
Handler: getRoutes(cfg, store, feedHandler),
Handler: getRoutes(cfg, store, feedHandler, pool),
}
go func() {