From e6d004e9c71ba276decb4257f5a3b7c3a1c7bcfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrej=20Rama=C5=A1euski?= <andrej@x2.cz> Date: Thu, 17 Feb 2022 01:25:23 +0100 Subject: [PATCH] Less logging --- openapi.yaml | 2 +- tools/online-counter/online.go | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index db7b77c..9290b50 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.3 info: - version: "3.0.0" + version: "3.0.1" title: CF Online description: CF Online license: diff --git a/tools/online-counter/online.go b/tools/online-counter/online.go index 41d27a8..7593d6b 100644 --- a/tools/online-counter/online.go +++ b/tools/online-counter/online.go @@ -74,13 +74,11 @@ func main() { for event, count := range online { elapsed := now.Sub(lastPub[event]).Round(time.Second).Seconds() + if elapsed < float64(count.All)/tarpitFactor { break } - fmt.Println(elapsed) - - // tady muze byt next lastPub[event] = now topic := fmt.Sprintf("online:%s", event) -- GitLab