From a3664763335a217fd071f50af84855ed6722f52c Mon Sep 17 00:00:00 2001 From: tomaslin Date: Fri, 17 Jun 2016 17:52:37 -0700 Subject: [PATCH] revert some changes that seem to make performance worse --- .../netflix/spinnaker/igor/config/JenkinsConfig.groovy | 1 - .../spinnaker/igor/jenkins/JenkinsBuildMonitor.groovy | 9 +++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/igor-web/src/main/groovy/com/netflix/spinnaker/igor/config/JenkinsConfig.groovy b/igor-web/src/main/groovy/com/netflix/spinnaker/igor/config/JenkinsConfig.groovy index ebdf416a4..93e48666a 100644 --- a/igor-web/src/main/groovy/com/netflix/spinnaker/igor/config/JenkinsConfig.groovy +++ b/igor-web/src/main/groovy/com/netflix/spinnaker/igor/config/JenkinsConfig.groovy @@ -72,7 +72,6 @@ class JenkinsConfig { static JenkinsClient jenkinsClient(String address, String username, String password, int timeout = 30000) { OkHttpClient client = new OkHttpClient() client.setReadTimeout(timeout, TimeUnit.MILLISECONDS) - client.setConnectionPool(new ConnectionPool(0, 5 * 60 * 1000)); new RestAdapter.Builder() .setEndpoint(Endpoints.newFixedEndpoint(address)) diff --git a/igor-web/src/main/groovy/com/netflix/spinnaker/igor/jenkins/JenkinsBuildMonitor.groovy b/igor-web/src/main/groovy/com/netflix/spinnaker/igor/jenkins/JenkinsBuildMonitor.groovy index eb7d9f0db..10c6e1fe6 100644 --- a/igor-web/src/main/groovy/com/netflix/spinnaker/igor/jenkins/JenkinsBuildMonitor.groovy +++ b/igor-web/src/main/groovy/com/netflix/spinnaker/igor/jenkins/JenkinsBuildMonitor.groovy @@ -110,9 +110,14 @@ class JenkinsBuildMonitor implements PollingMonitor { { if (isInService()) { log.info "- Polling cycle started -" - buildMasters.filteredMap(BuildServiceProvider.JENKINS).keySet().parallelStream().forEach( - { master -> changedBuilds(master) } + + Observable.from( buildMasters.filteredMap(BuildServiceProvider.JENKINS).keySet() ) + .subscribe( + { master -> + changedBuilds(master) + }, { log.error("Error: ${it.message}") } ) + log.info "- Polling cycle done -" } else { log.info("not in service (lastPoll: ${lastPoll ?: 'n/a'})")