Skip to content

Commit

Permalink
Bump bridge state TTLs
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Jun 22, 2023
1 parent 8560d49 commit b7a4f77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bridge/status/bridgestate.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ func (pong BridgeState) Fill(user BridgeStateFiller) BridgeState {
pong.Timestamp = jsontime.UnixNow()
pong.Source = "bridge"
if len(pong.Error) > 0 {
pong.TTL = 60
pong.TTL = 3600
msg, ok := BridgeStateHumanErrors[pong.Error]
if ok {
pong.Message = msg
}
} else {
pong.TTL = 240
pong.TTL = 21600
}
return pong
}
Expand Down Expand Up @@ -141,5 +141,5 @@ func (pong *BridgeState) ShouldDeduplicate(newPong *BridgeState) bool {
if pong == nil || pong.StateEvent != newPong.StateEvent || pong.Error != newPong.Error {
return false
}
return pong.Timestamp.Add(time.Duration(pong.TTL/5) * time.Second).After(time.Now())
return pong.Timestamp.Add(time.Duration(pong.TTL) * time.Second).After(time.Now())
}

0 comments on commit b7a4f77

Please sign in to comment.