# HG changeset patch # User wbell # Date 1205528228 0 # Node ID 5181353ccb4112557d279f4d6322fadfa4e3bfc6 # Parent 07148aa7667e0498b563ee673e70bef697ae3723 Slaves should continue to run builds without sleeping as long as new builds are available. Applied patch from Thomas Mueller. Closes #181 diff --git a/bitten/slave.py b/bitten/slave.py --- 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()