Disable incStat
All checks were successful
the build was successful

This commit is contained in:
Peter Stuifzand 2018-08-05 18:00:15 +02:00
parent aa257744f0
commit 68d84bdaa3

View File

@ -66,12 +66,12 @@ func (handler *subscriptionHandler) handlePublish(w http.ResponseWriter, r *http
return err
}
handler.incStat(fmt.Sprintf("publish.%s", topic))
// handler.incStat(fmt.Sprintf("publish.%s", topic))
if subs, e := handler.Subscribers[topic]; e {
for _, sub := range subs {
handler.incStat(fmt.Sprintf("publish.post.%s.%s", topic, sub.Callback))
// handler.incStat(fmt.Sprintf("publish.post.%s.%s", topic, sub.Callback))
log.Printf("publish: creating post to %s\n", sub.Callback)
postReq, err := http.NewRequest("POST", sub.Callback, strings.NewReader(string(feedContent)))
if err != nil {
@ -264,7 +264,7 @@ func (handler *subscriptionHandler) ServeHTTP(w http.ResponseWriter, r *http.Req
if r.Method == http.MethodGet {
fmt.Fprintln(w, "WebSub hub")
if r.URL.Query().Get("debug") == "1" {
handler.incStat("http.index.debug")
// handler.incStat("http.index.debug")
enc := json.NewEncoder(w)
enc.SetIndent("", " ")
enc.Encode(handler.Subscribers)