summaryrefslogtreecommitdiff
path: root/morphlib
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-06-11 16:48:01 +0100
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-06-11 16:48:01 +0100
commit2ca28887442c733f2f7a39aa7a844b51643ecb29 (patch)
treea883ff57d8ab08656133e7a77c4760e6c15162cc /morphlib
parent13edeabd929b094ab2ec7288840e62d31d9feb67 (diff)
parent58e738ceb4b35031793a35e8affc929c7d82f76b (diff)
downloadmorph-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.py13
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()