diff options
author | 2023-10-16 21:20:58 -0700 | |
---|---|---|
committer | 2023-10-16 21:41:18 -0700 | |
commit | cc44d14722612d6a3db4360a971ac7cd0844b7ed (patch) | |
tree | bc8957460c5bbf91264ccd14fba499a5726ce32d /internal/api/category.go | |
parent | 54eb500315c5f506004c4659a6c964f61d40f6d5 (diff) | |
download | v2-cc44d14722612d6a3db4360a971ac7cd0844b7ed.tar.gz v2-cc44d14722612d6a3db4360a971ac7cd0844b7ed.tar.zst v2-cc44d14722612d6a3db4360a971ac7cd0844b7ed.zip |
Avoid excessive manual polling with default scheduler
Diffstat (limited to 'internal/api/category.go')
-rw-r--r-- | internal/api/category.go | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/internal/api/category.go b/internal/api/category.go index a378b32f..9e13a28f 100644 --- a/internal/api/category.go +++ b/internal/api/category.go @@ -5,6 +5,7 @@ package api // import "miniflux.app/v2/internal/api" import ( json_parser "encoding/json" + "log/slog" "net/http" "time" @@ -141,9 +142,14 @@ func (h *handler) refreshCategory(w http.ResponseWriter, r *http.Request) { return } - go func() { - h.pool.Push(jobs) - }() + slog.Info( + "Triggered a manual refresh of all feeds for a given category from the API", + slog.Int64("user_id", userID), + slog.Int64("category_id", categoryID), + slog.Int("nb_jobs", len(jobs)), + ) + + go h.pool.Push(jobs) json.NoContent(w, r) } |