diff options
author | Bjørn Erik Pedersen <[email protected]> | 2023-10-29 10:57:25 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-10-29 10:57:25 +0100 |
commit | eb5fd3127f3d557cc9771756c400baf4d12d2b4e (patch) | |
tree | ca2993f57ce31e18b29923ae6395f3308cde9024 /modules | |
parent | 3ed28e4bfe2d333fdf1ca2434b57cfc10c3d9791 (diff) | |
download | hugo-eb5fd3127f3d557cc9771756c400baf4d12d2b4e.tar.gz hugo-eb5fd3127f3d557cc9771756c400baf4d12d2b4e.zip |
Revert "modules: Adjust the log throttle logic a little"
This reverts commit 3f64b5a3de5f097c4ee1b70505398f75feb391c4.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/client.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/client.go b/modules/client.go index 9a0415632..b3dad498b 100644 --- a/modules/client.go +++ b/modules/client.go @@ -106,18 +106,16 @@ func NewClient(cfg ClientConfig) *Client { var throttleSince time.Time throttle := func(f func()) { - // Skip the first call. - // This is used for "download" etc. and we want to avoid - // logging anything if it is fast. if throttleSince.IsZero() { throttleSince = time.Now() + f() return } if time.Since(throttleSince) < 6*time.Second { return } - f() throttleSince = time.Now() + f() } return &Client{ |