Skip to content

Commit

Permalink
Merge pull request #186 from xmidt-org/caduceusQueue
Browse files Browse the repository at this point in the history
caduceus queue cutoff
  • Loading branch information
schmidtw authored Mar 19, 2020
2 parents d445e08 + 76ee407 commit 987d0e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]
- adding docker automation [#184](https://github.com/xmidt-org/caduceus/pull/184)
- fixing caduceus queue cutoffs [#185](https://github.com/xmidt-org/caduceus/issues/185)

## [v0.2.3]
- updated release pipeline to use travis [#174](https://github.com/xmidt-org/caduceus/pull/174)
Expand Down
4 changes: 4 additions & 0 deletions outboundSender.go
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,10 @@ func (obs *CaduceusOutboundSender) send(urls *ring.Ring, secret, acceptType stri
// queueOverflow handles the logic of what to do when a queue overflows
func (obs *CaduceusOutboundSender) queueOverflow() {
obs.mutex.Lock()
if time.Now().Before(obs.dropUntil) {
obs.mutex.Unlock()
return
}
obs.dropUntil = time.Now().Add(obs.cutOffPeriod)
obs.dropUntilGauge.Set(float64(obs.dropUntil.Unix()))
secret := obs.listener.Config.Secret
Expand Down

0 comments on commit 987d0e9

Please sign in to comment.