Make jenkins get info task synchronous

This is called within the main loop which means if there are a lot
of jenkins tasks pending, the main loop waits until they are all
finished.  Instead, make this synchronous.  It should be lightweight
so the additional load on jenkins should be negligible.

Also increase the sleep in the main loop to 10 seconds to mitigate
this somewhat.

Change-Id: I16e27fbd9bfef0617e35df08f4fd17bc2ead67b0
This commit is contained in:
James E. Blair 2014-02-18 16:57:40 -08:00
parent 6878447060
commit 91f7af41d3
2 changed files with 2 additions and 2 deletions

View File

@ -134,4 +134,4 @@ class JenkinsManager(TaskManager):
self.submitTask(StartBuildTask(name=name, params=params))
def getInfo(self):
return self.submitTask(GetInfoTask())
return self._client.get_info()

View File

@ -36,7 +36,7 @@ import provider_manager
MINS = 60
HOURS = 60 * MINS
WATERMARK_SLEEP = 5 # Interval between checking if new servers needed
WATERMARK_SLEEP = 10 # Interval between checking if new servers needed
IMAGE_TIMEOUT = 6 * HOURS # How long to wait for an image save
CONNECT_TIMEOUT = 10 * MINS # How long to try to connect after a server
# is ACTIVE