aboutsummaryrefslogtreecommitdiff
path: root/internal/ui/category_refresh.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <f@miniflux.net> 2023-10-16 21:20:58 -0700
committerGravatar Frédéric Guillot <f@miniflux.net> 2023-10-16 21:41:18 -0700
commitcc44d14722612d6a3db4360a971ac7cd0844b7ed (patch)
treebc8957460c5bbf91264ccd14fba499a5726ce32d /internal/ui/category_refresh.go
parent54eb500315c5f506004c4659a6c964f61d40f6d5 (diff)
downloadv2-cc44d14722612d6a3db4360a971ac7cd0844b7ed.tar.gz
v2-cc44d14722612d6a3db4360a971ac7cd0844b7ed.tar.zst
v2-cc44d14722612d6a3db4360a971ac7cd0844b7ed.zip
Avoid excessive manual polling with default scheduler
Diffstat (limited to 'internal/ui/category_refresh.go')
-rw-r--r--internal/ui/category_refresh.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/internal/ui/category_refresh.go b/internal/ui/category_refresh.go
index 5d084c06..f852a64b 100644
--- a/internal/ui/category_refresh.go
+++ b/internal/ui/category_refresh.go
@@ -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
}