summaryrefslogtreecommitdiff
path: root/distbuild/mainloop.py
diff options
context:
space:
mode:
authorLauren Perry <lauren.perry@codethink.co.uk>2015-04-10 15:29:06 +0100
committerRichard Ipsum <richardipsum@fastmail.co.uk>2015-04-29 16:11:14 +0000
commit4941d1dd806d1751b1ac0f7a695ec2b6dce93ba0 (patch)
tree0f39b69358e9af9066b9d2dbc2ceffe4eebb7cf2 /distbuild/mainloop.py
parent84096556ea54d4af236f1fe5f7ccf61c1343016f (diff)
downloadmorph-4941d1dd806d1751b1ac0f7a695ec2b6dce93ba0.tar.gz
distbuild: Add distbuild status command
Adds a command to get the status of all recently ran distbuilds for a given server (e.g. Running, Finished, Failed, Cancelled), so as to tell if a build running via distbuild-start has finished or otherwise exited without going through the server's log files Change-Id: I5ce9fe54ae7b1bd8fe3e0d629f615042be8827ed
Diffstat (limited to 'distbuild/mainloop.py')
-rw-r--r--distbuild/mainloop.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/distbuild/mainloop.py b/distbuild/mainloop.py
index d48d60ec..4d5a2b61 100644
--- a/distbuild/mainloop.py
+++ b/distbuild/mainloop.py
@@ -19,6 +19,7 @@ import fcntl
import logging
import os
import select
+import collections
class MainLoop(object):
@@ -40,6 +41,7 @@ class MainLoop(object):
self._machines = []
self._sources = []
self._events = []
+ self.build_info = collections.deque(maxlen=1000)
self.dump_filename = None
def add_state_machine(self, machine):
@@ -51,7 +53,7 @@ class MainLoop(object):
filename = '%s%s.dot' % (self.dump_filename,
machine.__class__.__name__)
machine.dump_dot(filename)
-
+
def remove_state_machine(self, machine):
logging.debug('MainLoop.remove_state_machine: %s' % machine)
self._machines.remove(machine)