Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1038)

Unified Diff: appengine_apps/trooper_o_matic/appengine_module/trooper_o_matic/controller.py

Issue 774323002: Moved trooper_o_matic to appengine/ (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine_apps/trooper_o_matic/appengine_module/trooper_o_matic/controller.py
diff --git a/appengine_apps/trooper_o_matic/appengine_module/trooper_o_matic/controller.py b/appengine_apps/trooper_o_matic/appengine_module/trooper_o_matic/controller.py
deleted file mode 100644
index b7d943b7f7a4d97ec05bad07a13f4023bc944787..0000000000000000000000000000000000000000
--- a/appengine_apps/trooper_o_matic/appengine_module/trooper_o_matic/controller.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright (c) 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-from google.appengine.ext import ndb
-
-from appengine_module.trooper_o_matic import models
-
-
-def get_cq_stats(project):
- project_key = ndb.Key(models.Project, project)
- single_run_data = models.CqStat.query(ancestor=project_key).order(
- -models.CqStat.timestamp).fetch(limit=100)
- single_run_data = [run for run in single_run_data if run.p50]
- single_run_data.reverse()
- queue_time_data = models.CqTimeInQueueForPatchStat.query(
- ancestor=project_key).order(-models.CqStat.timestamp).fetch(limit=100)
- queue_time_data = [run for run in queue_time_data if run.p50]
- queue_time_data.reverse()
- total_time_data = models.CqTotalTimeForPatchStat.query(
- ancestor=project_key).order(-models.CqStat.timestamp).fetch(limit=100)
- total_time_data = [run for run in total_time_data if run.p50]
- total_time_data.reverse()
-
- return {
- 'single_run_data': single_run_data,
- 'queue_time_data': queue_time_data,
- 'total_time_data': total_time_data,
- }

Powered by Google App Engine
This is Rietveld 408576698