diff --git a/src/caduceus/caduceus.go b/src/caduceus/caduceus.go index 5923148e..fdb3c47c 100644 --- a/src/caduceus/caduceus.go +++ b/src/caduceus/caduceus.go @@ -142,8 +142,6 @@ func caduceus(arguments []string) int { webhookFactory.Initialize(mux, selfURL, webhookHandler, logger) webhookFactory.PrepareAndStart() - - caduceusHealth := &CaduceusHealth{} var runnable concurrent.Runnable @@ -158,6 +156,16 @@ func caduceus(arguments []string) int { logger.Info("Caduceus is up and running!") + // Attempt to obtain the current listener list from current system without having to wait for listener reregistration. + startChan := make(chan webhook.Result, 1) + webhookFactory.Start.GetCurrentSystemsHooks(startChan) + var webhookStartResults webhook.Result = <- startChan + if webhookStartResults.Error != nil { + logger.Error(webhookStartResults.Error) + } else { + webhookRegistry.Update(webhookStartResults.Hooks) + } + var ( signals = make(chan os.Signal, 1) ) diff --git a/src/glide.lock b/src/glide.lock index 8952aec6..5e6b23ca 100644 --- a/src/glide.lock +++ b/src/glide.lock @@ -1,5 +1,5 @@ -hash: 7c84fda85fd0f2d1335f40f346b65391fe63e4e70d752d137bcf377220479aef -updated: 2017-06-12T16:14:22.811127772-07:00 +hash: ec85e02ca503fa7baa7d9a6c12b4120d40580091b6277210b7a73412828af461 +updated: 2017-06-15T13:55:38.935600921-07:00 imports: - name: github.com/aws/aws-sdk-go version: 7be45195c3af1b54a609812f90c05a7e492e2491 @@ -34,7 +34,7 @@ imports: subpackages: - linux - name: github.com/Comcast/webpa-common - version: 9dfc3db86d11729a233b1b788f00b501c59c1fff + version: b6156ba40c5a41f41efeb331ef90d43e699076c1 subpackages: - concurrent - handler @@ -140,11 +140,11 @@ imports: subpackages: - codec - name: golang.org/x/sys - version: 0b25a408a50076fbbcae6b7ac0ea5fbb0b085e79 + version: fb4cac33e3196ff7f507ab9b2d2a44b0142f5b5a subpackages: - unix - name: golang.org/x/text - version: 210eee5cf7323015d097341bcf7166130d001cd8 + version: 9e2f80a6ba7ed4ba13e0cd4b1f094bf916875735 subpackages: - transform - unicode/norm diff --git a/src/glide.yaml b/src/glide.yaml index c3f84a8f..a5cff77c 100644 --- a/src/glide.yaml +++ b/src/glide.yaml @@ -1,7 +1,7 @@ package: . import: - package: github.com/Comcast/webpa-common - version: 9dfc3db86d11729a233b1b788f00b501c59c1fff + version: b6156ba40c5a41f41efeb331ef90d43e699076c1 subpackages: - concurrent - handler