From 2feda2d5bf86c3dca88d00f48301f8b0ca744a65 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Fri, 13 Sep 2013 11:48:19 -0700 Subject: [PATCH] Add more queue information to status JSON Adds item ahead, items behind, and failing reasons for each item to the JSON status output. Change-Id: Iefa531e773b4cd4a62fd42f7e05600cca4421ca3 --- zuul/model.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zuul/model.py b/zuul/model.py index ffbad0152f..2d0f25674a 100644 --- a/zuul/model.py +++ b/zuul/model.py @@ -298,6 +298,12 @@ class Pipeline(object): else: ret['url'] = None ret['id'] = changeish._id() + if item.item_ahead: + ret['item_ahead'] = item.item_ahead.change._id() + else: + ret['item_ahead'] = None + ret['items_behind'] = [i.change._id() for i in item.items_behind] + ret['failing_reasons'] = item.current_build_set.failing_reasons ret['project'] = changeish.project.name ret['enqueue_time'] = int(item.enqueue_time * 1000) ret['jobs'] = []