Browse Source

Merge "Collect and report last reconfigured timestamp"

changes/67/65467/3
Jenkins 8 years ago committed by Gerrit Code Review
parent
commit
86c120eb03
  1. 1
      etc/status/public_html/status-basic.json-sample
  2. 1
      etc/status/public_html/status-openstack.json-sample
  3. 8
      zuul/scheduler.py

1
etc/status/public_html/status-basic.json-sample

@ -1,4 +1,5 @@
{
"last_reconfigured": 1389381756000,
"message": "Example error message",
"pipelines": [
{

1
etc/status/public_html/status-openstack.json-sample

@ -1,4 +1,5 @@
{
"last_reconfigured": 1389381756000,
"pipelines": [
{
"name": "check",

8
zuul/scheduler.py

@ -132,6 +132,7 @@ class Scheduler(threading.Thread):
self.layout = model.Layout()
self.zuul_version = zuul_version.version_info.version_string()
self.last_reconfigured = None
def stop(self):
self._stopped = True
@ -460,6 +461,7 @@ class Scheduler(threading.Thread):
self.log.debug("Waiting for reconfiguration")
event.wait()
self.log.debug("Reconfiguration complete")
self.last_reconfigured = int(time.time())
def promote(self, pipeline_name, change_ids):
event = PromoteEvent(pipeline_name, change_ids)
@ -775,6 +777,9 @@ class Scheduler(threading.Thread):
ret += ', queue length: %s' % self.trigger_event_queue.qsize()
ret += '</p>'
if self.last_reconfigured:
ret += '<p>Last reconfigured: %s</p>' % self.last_reconfigured
keys = self.layout.pipelines.keys()
for key in keys:
pipeline = self.layout.pipelines[key]
@ -806,6 +811,9 @@ class Scheduler(threading.Thread):
data['result_event_queue']['length'] = \
self.result_event_queue.qsize()
if self.last_reconfigured:
data['last_reconfigured'] = self.last_reconfigured * 1000
pipelines = []
data['pipelines'] = pipelines
keys = self.layout.pipelines.keys()

Loading…
Cancel
Save