Add enqueue_time to JSON output for a change
This adds a javascript timestamp for each change in the JSON output.
Change-Id: I7965c6a7ff6e4e5522da3c51936cfdfb6cf36e91
Reviewed-on: https://review.openstack.org/32064
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
diff --git a/zuul/model.py b/zuul/model.py
index eb8bc26..4fd793d 100644
--- a/zuul/model.py
+++ b/zuul/model.py
@@ -254,6 +254,7 @@
ret['url'] = None
ret['id'] = changeish._id()
ret['project'] = changeish.project.name
+ ret['enqueue_time'] = int(changeish.enqueue_time * 1000)
ret['jobs'] = []
for job in self.getJobs(changeish):
build = changeish.current_build_set.getBuild(job.name)