diff options
Diffstat (limited to 'lib/api/api.go')
-rw-r--r-- | lib/api/api.go | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/api/api.go b/lib/api/api.go index b96fc14ee..5a4ee76a7 100644 --- a/lib/api/api.go +++ b/lib/api/api.go @@ -355,12 +355,7 @@ func (s *service) Serve(ctx context.Context) error { // Handle Prometheus metrics promHttpHandler := promhttp.Handler() - mux.HandleFunc("/metrics", func(w http.ResponseWriter, req *http.Request) { - // fetching metrics counts as an event, for the purpose of whether - // we should prepare folder summaries etc. - s.fss.OnEventRequest() - promHttpHandler.ServeHTTP(w, req) - }) + mux.Handle("/metrics", promHttpHandler) guiCfg := s.cfg.GUI() @@ -1395,11 +1390,7 @@ func (s *service) getDiskEvents(w http.ResponseWriter, r *http.Request) { s.getEvents(w, r, sub) } -func (s *service) getEvents(w http.ResponseWriter, r *http.Request, eventSub events.BufferedSubscription) { - if eventSub.Mask()&(events.FolderSummary|events.FolderCompletion) != 0 { - s.fss.OnEventRequest() - } - +func (*service) getEvents(w http.ResponseWriter, r *http.Request, eventSub events.BufferedSubscription) { qs := r.URL.Query() sinceStr := qs.Get("since") limitStr := qs.Get("limit") |