Changeset 162358 in webkit
- Timestamp:
- Jan 20, 2014, 10:37:49 AM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r162357 r162358 1 2014-01-20 Alexey Proskuryakov <ap@apple.com> 2 3 EWS should provide better information to Dashboard via JSON 4 https://bugs.webkit.org/show_bug.cgi?id=127265 5 6 Reviewed by Ryosuke Niwa. 7 8 * QueueStatusServer/app.yaml: Updated version. 9 10 * QueueStatusServer/main.py: 11 * QueueStatusServer/handlers/queuelengthjson.py: 12 Added a way to cheaply get only the queue length, which is all the dashboard 13 needs unless a popover is opened. 14 15 * QueueStatusServer/handlers/queuestatusjson.py: Updated to return more information 16 that we will need. Changed some field names to be more meaningful. Fixed bot listing 17 to understand that a bot can be reprurposed and used in a different queue. 18 1 19 2014-01-20 Alexey Proskuryakov <ap@apple.com> 2 20 -
trunk/Tools/QueueStatusServer/app.yaml
r162289 r162358 1 1 application: webkit-queues 2 version: 162 287# Bugzilla bug ID of last major change2 version: 162358 # Bugzilla bug ID of last major change 3 3 runtime: python 4 4 api_version: 1 -
trunk/Tools/QueueStatusServer/handlers/queuestatusjson.py
r161098 r162358 1 # Copyright (C) 2013 Apple. All rights reserved.1 # Copyright (C) 2013, 2014 Apple Inc. All rights reserved. 2 2 # 3 3 # Redistribution and use in source and binary forms, with or without … … 46 46 rows = [] 47 47 for item_id in queued_items.item_ids: 48 statuses = QueueStatus.all().filter('queue_name =', queue.name()).filter('active_patch_id =', item_id).order('-date').fetch(1) 49 status = statuses[0].message if statuses else "" 48 patchStatusQuery = QueueStatus.all().filter('queue_name =', queue.name()).filter('active_patch_id =', item_id).order('-date') 49 statuses = patchStatusQuery.fetch(1) 50 message = None 51 message_time = None 52 bug_id = None 53 results_url = None 54 if statuses: 55 message = statuses[0].message 56 message_time = statuses[0].date 57 bug_id = statuses[0].active_bug_id 58 results_url = self.request.host_url + "/results/" + str(statuses[0].key().id()) if statuses[0].results_file else None 59 50 60 rows.append({ 51 61 "attachment_id": item_id, 62 "bug_id": bug_id, 52 63 "active": active_items and active_items.time_for_item(item_id) != None, 53 "status": status, 64 "active_since": active_items and active_items.time_for_item(item_id), 65 "latest_message": message, 66 "latest_message_time": message_time, 67 "message_count": patchStatusQuery.count(), 54 68 "status_page": self.request.host_url + "/patch/" + str(item_id), 69 "latest_results": results_url, 55 70 }) 56 71 return rows 57 72 58 73 def _bots(self, queue): 74 # First, collect all bots that ever served this queue. 59 75 bot_id_statuses = QueueStatus.all(projection=['bot_id'], distinct=True).filter('queue_name =', queue.name()).fetch(500) 60 76 bot_ids = list(entry.bot_id for entry in bot_id_statuses) … … 62 78 for bot_id in bot_ids: 63 79 status = QueueStatus.all().filter('bot_id =', bot_id).order('-date').get() 80 81 if status.queue_name != queue.name(): 82 # The bot got re-purposed, and is serving a different queue now. 83 continue 84 64 85 result.append({ 65 86 "bot_id": bot_id, … … 67 88 "latest_message": status.message, 68 89 "latest_message_time": status.date, 90 "latest_message_bug_id": status.active_bug_id, 91 "latest_message_patch_id": status.active_patch_id, 69 92 "latest_output": self.request.host_url + "/results/" + str(status.key().id()) if status.results_file else None, 70 "active_bug_id": status.active_bug_id,71 "active_patch_id": status.active_patch_id,72 93 }) 73 94 return result … … 86 107 status = { 87 108 "status_page": self.request.host_url + "/queue-status/" + queue_name, 109 "charts_page": self.request.host_url + "/queue-charts/" + queue_name, 88 110 "queue": self._rows_for_work_items(queue), 89 111 "bots": self._bots(queue), -
trunk/Tools/QueueStatusServer/main.py
r161062 r162358 41 41 from handlers.patchstatus import PatchStatus 42 42 from handlers.queuecharts import QueueCharts 43 from handlers.queuelengthjson import QueueLengthJSON 43 44 from handlers.queuestatus import QueueStatus 44 45 from handlers.queuestatusjson import QueueStatusJSON … … 69 70 (r'/svn-revision/(.*)', SVNRevision), 70 71 (r'/queue-charts/(.*)', QueueCharts), 72 (r'/queue-length-json/(.*)', QueueLengthJSON), 71 73 (r'/queue-status/(.*)/bots/(.*)', QueueStatus), 72 74 (r'/queue-status/(.*)', QueueStatus),
Note:
See TracChangeset
for help on using the changeset viewer.