Merge pull request 'fix' (#28) from master into dev

Reviewed-on: https://gitea.chocomarsh.com/self/queues-go/pulls/28
This commit is contained in:
emmatveev 2025-06-15 16:18:35 +03:00
commit 900cb70f37

View File

@ -49,10 +49,11 @@ func handlerWrapper(f func(*http.Request) (interface{}, int)) func(http.Response
w.WriteHeader(status)
}
go writeMetric(start, r.URL.Path, status, int(time.Since(start).Milliseconds()), r.Method)
if r.URL == "/api/v1/finish" || r.URL == "/api/v1/put":
if r.URL.Path != "/api/v1/take" {
log.Printf("%s %d %s", r.URL, status, time.Since(start))
}
}
}
func main() {
client.Connect()