Skip to content

Commit

Permalink
Add log line for servergroup configs that are taking a long time to b…
Browse files Browse the repository at this point in the history
…e ready

Fixes #313
  • Loading branch information
jacksontj committed May 30, 2020
1 parent c5c920c commit 69b447e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pkg/proxystorage/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,15 @@ type proxyStorageState struct {

// Ready blocks until all servergroups are ready
func (p *proxyStorageState) Ready() {
for _, sg := range p.sgs {
<-sg.Ready
for i, sg := range p.sgs {
select {
case <-time.After(time.Second * 5):
logrus.Debugf("Servergroup %d taking a long time to be Ready (still waiting)", i)
<-sg.Ready
case <-sg.Ready:
continue
}

}
}

Expand Down

0 comments on commit 69b447e

Please sign in to comment.