Skip to content

Commit

Permalink
revert some changes that seem to make performance worse
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaslin committed Jun 18, 2016
1 parent 2869887 commit a366476
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'})")
Expand Down

0 comments on commit a366476

Please sign in to comment.