diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-06-11 16:48:01 +0100 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-06-11 16:48:01 +0100 |
commit | 2ca28887442c733f2f7a39aa7a844b51643ecb29 (patch) | |
tree | a883ff57d8ab08656133e7a77c4760e6c15162cc /morphlib | |
parent | 13edeabd929b094ab2ec7288840e62d31d9feb67 (diff) | |
parent | 58e738ceb4b35031793a35e8affc929c7d82f76b (diff) | |
download | morph-2ca28887442c733f2f7a39aa7a844b51643ecb29.tar.gz |
Merge branch 'baserock/richardipsum/distbuild_err_when_no_controller2'
Reviewed by:
Lars Wirzenius
Richard Maw
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/buildcommand.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py index 9fab5c07..f68046e3 100644 --- a/morphlib/buildcommand.py +++ b/morphlib/buildcommand.py @@ -502,6 +502,9 @@ class BuildCommand(object): class InitiatorBuildCommand(BuildCommand): + RECONNECT_INTERVAL = 30 # seconds + MAX_RETRIES = 1 + def __init__(self, app, addr, port): self.app = app self.addr = addr @@ -524,7 +527,13 @@ class InitiatorBuildCommand(BuildCommand): self.app.status(msg='Starting distributed build') loop = distbuild.MainLoop() - cm = distbuild.ConnectionMachine( - self.addr, self.port, distbuild.Initiator, [self.app] + args) + cm = distbuild.InitiatorConnectionMachine(self.app, + self.addr, + self.port, + distbuild.Initiator, + [self.app] + args, + self.RECONNECT_INTERVAL, + self.MAX_RETRIES) + loop.add_state_machine(cm) loop.run() |