mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-20 21:33:19 -06:00
Logging level
This commit is contained in:
parent
12f2388777
commit
b00f81cb5d
|
|
@ -134,13 +134,13 @@ func (s *ServerStatistics) BackoffIfRequired(backingOff atomic.Bool, interrupt <
|
|||
|
||||
// Work out how long we should be backing off for.
|
||||
duration := time.Second * time.Duration(math.Exp2(float64(count)))
|
||||
logrus.Infof("Backing off %q for %s", s.serverName, duration)
|
||||
logrus.Debugf("Backing off %q for %s", s.serverName, duration)
|
||||
|
||||
// Wait for either an interruption or for the backoff to
|
||||
// complete.
|
||||
select {
|
||||
case <-interrupt:
|
||||
logrus.Infof("Interrupting backoff for %q", s.serverName)
|
||||
logrus.Debugf("Interrupting backoff for %q", s.serverName)
|
||||
case <-time.After(duration):
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue