From c0914820c0117e11fa8849f3cb7c86109c60b978 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Sun, 28 May 2023 12:31:52 +0000 Subject: [PATCH] feat: disable burst for mr/metasnap api --- distro/debian/snapshot/metasnap/metasnap.go | 4 ++-- distro/debian/snapshot/mr/mr.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/distro/debian/snapshot/metasnap/metasnap.go b/distro/debian/snapshot/metasnap/metasnap.go index 3fa40ac..4843f91 100644 --- a/distro/debian/snapshot/metasnap/metasnap.go +++ b/distro/debian/snapshot/metasnap/metasnap.go @@ -20,8 +20,8 @@ const apiURL = "http://metasnap.debian.net/cgi-bin/api?" var ( limiterTimeout time.Duration = time.Second / 20 - limiterMaxTimeout time.Duration = time.Second * 3 - limiterBurst int = 3 + limiterMaxTimeout time.Duration = time.Second + limiterBurst int = 1 limiterUpdateDelay time.Duration = time.Second * 10 Limiter = rate.NewLimiter(rate.Every(limiterTimeout), limiterBurst) diff --git a/distro/debian/snapshot/mr/mr.go b/distro/debian/snapshot/mr/mr.go index dc6fba6..53cb19d 100644 --- a/distro/debian/snapshot/mr/mr.go +++ b/distro/debian/snapshot/mr/mr.go @@ -17,8 +17,8 @@ const apiURL = "https://snapshot.debian.org/mr" var ( limiterTimeout time.Duration = time.Second / 20 - limiterMaxTimeout time.Duration = time.Second * 3 - limiterBurst int = 3 + limiterMaxTimeout time.Duration = time.Second + limiterBurst int = 1 limiterUpdateDelay time.Duration = time.Second * 10 Limiter = rate.NewLimiter(rate.Every(limiterTimeout), limiterBurst)