Mercurial > bitten > bitten-test
changeset 480:5181353ccb41
Slaves should continue to run builds without sleeping as long as new builds are available. Applied patch from Thomas Mueller. Closes #181
author | wbell |
---|---|
date | Fri, 14 Mar 2008 20:57:08 +0000 |
parents | 07148aa7667e |
children | 0ec997423fce |
files | bitten/slave.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/slave.py +++ b/bitten/slave.py @@ -147,7 +147,9 @@ while True: try: try: - self._create_build() + job_done = self._create_build() + if job_done: + continue except urllib2.HTTPError, e: # HTTPError doesn't have the "reason" attribute of URLError log.error(e) @@ -193,8 +195,10 @@ if resp.code == 201: self._initiate_build(resp.info().get('location')) + return True elif resp.code == 204: log.info('No pending builds') + return False else: log.error('Unexpected response (%d %s)', resp.code, resp.msg) raise ExitSlave()