Skip to content

Commit

Permalink
Merge pull request #119 from tomaslin/more-changes
Browse files Browse the repository at this point in the history
revert some changes that seem to make performance worse
  • Loading branch information
tomaslin authored Jun 18, 2016
2 parents afc0191 + a366476 commit 9cc85c1
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 9cc85c1

Please sign in to comment.