temporarily remove last build time, query doesn't work with psql
authorTom Powell <tom@powell.io>
Thu, 15 Nov 2018 04:20:05 +0000 (20:20 -0800)
committerTom Powell <tom@powell.io>
Thu, 15 Nov 2018 04:20:05 +0000 (20:20 -0800)
ui/app.py

index b7fdef5bc3bde43d271027dcb17b5b6affbef2ce..e1ce47491c08bb47aa09234e4cc7bb805c628348 100644 (file)
--- a/ui/app.py
+++ b/ui/app.py
@@ -67,14 +67,6 @@ def stats():
         func.sum(models.Build.build_duration)
     ).group_by(models.Build.build_version).all()
 
-    last_build_times = models.Build.query.join(models.Build.build_runner).with_entities(
-        models.Runner.runner_name,
-        models.Build.build_version,
-        models.Build.build_duration
-    ).filter(
-        models.Build.build_status == "success"
-    ).group_by(models.Runner.runner_name, models.Build.build_version).all()
-
     runner_build_status = models.Build.query.join(models.Build.build_runner).with_entities(
         models.Runner.runner_name,
         models.Build.build_status,
@@ -107,9 +99,6 @@ def stats():
             'sum': build_time[5] if build_time[5] else 0,
         }
 
-    for build_time in last_build_times:
-        stats['times'].setdefault(build_time[0], {})[build_time[1]]["last"] = build_time[2]
-
     for build_status in runner_build_status:
         stats['builds']['all'].setdefault(build_status[1], 0)
         stats['builds']['all'][build_status[1]] += build_status[2]