mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Avoid excessive manual polling with default scheduler
This commit is contained in:
parent
54eb500315
commit
cc44d14722
7 changed files with 40 additions and 15 deletions
|
@ -4,6 +4,7 @@
|
|||
package ui // import "miniflux.app/v2/internal/ui"
|
||||
|
||||
import (
|
||||
"log/slog"
|
||||
"net/http"
|
||||
|
||||
"miniflux.app/v2/internal/http/request"
|
||||
|
@ -31,9 +32,14 @@ func (h *handler) refreshCategory(w http.ResponseWriter, r *http.Request) int64
|
|||
return 0
|
||||
}
|
||||
|
||||
go func() {
|
||||
h.pool.Push(jobs)
|
||||
}()
|
||||
slog.Info(
|
||||
"Triggered a manual refresh of all feeds for a given category from the web ui",
|
||||
slog.Int64("user_id", userID),
|
||||
slog.Int64("category_id", categoryID),
|
||||
slog.Int("nb_jobs", len(jobs)),
|
||||
)
|
||||
|
||||
go h.pool.Push(jobs)
|
||||
|
||||
return categoryID
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue