Diff
Modified: trunk/Tools/ChangeLog (174290 => 174291)
--- trunk/Tools/ChangeLog 2014-10-03 21:18:12 UTC (rev 174290)
+++ trunk/Tools/ChangeLog 2014-10-03 21:35:16 UTC (rev 174291)
@@ -1,3 +1,17 @@
+2014-10-03 Alexey Proskuryakov <[email protected]>
+
+ Record latest message in PatchLog for quick access
+ https://bugs.webkit.org/show_bug.cgi?id=137405
+
+ Reviewed by Ryosuke Niwa.
+
+ It's no SQL...
+
+ * QueueStatusServer/handlers/releasepatch.py:
+ * QueueStatusServer/handlers/updatestatus.py:
+ * QueueStatusServer/loggers/recordpatchevent.py:
+ * QueueStatusServer/model/patchlog.py:
+
2014-10-02 David Farler <[email protected]>
-asan-blacklist option also renamed to generic -fsanitize-blacklist
Modified: trunk/Tools/QueueStatusServer/app.yaml (174290 => 174291)
--- trunk/Tools/QueueStatusServer/app.yaml 2014-10-03 21:18:12 UTC (rev 174290)
+++ trunk/Tools/QueueStatusServer/app.yaml 2014-10-03 21:35:16 UTC (rev 174291)
@@ -1,5 +1,5 @@
application: webkit-queues
-version: 174248 # Bugzilla bug ID of last major change
+version: 174291 # Bugzilla bug ID of last major change
runtime: python
api_version: 1
Modified: trunk/Tools/QueueStatusServer/handlers/releasepatch.py (174290 => 174291)
--- trunk/Tools/QueueStatusServer/handlers/releasepatch.py 2014-10-03 21:18:12 UTC (rev 174290)
+++ trunk/Tools/QueueStatusServer/handlers/releasepatch.py 2014-10-03 21:35:16 UTC (rev 174291)
@@ -55,6 +55,6 @@
# WorkItems and ActiveWorkItems.
queue.work_items().remove_work_item(attachment_id)
- RecordPatchEvent.stopped(attachment_id, queue_name)
+ RecordPatchEvent.stopped(attachment_id, queue_name, last_status)
queue.active_work_items().expire_item(attachment_id)
Modified: trunk/Tools/QueueStatusServer/handlers/updatestatus.py (174290 => 174291)
--- trunk/Tools/QueueStatusServer/handlers/updatestatus.py 2014-10-03 21:18:12 UTC (rev 174290)
+++ trunk/Tools/QueueStatusServer/handlers/updatestatus.py 2014-10-03 21:35:16 UTC (rev 174291)
@@ -66,5 +66,5 @@
queue_status.put()
RecordBotEvent.record_activity(queue_status.queue_name, queue_status.bot_id)
if queue_status.active_patch_id:
- RecordPatchEvent.updated(queue_status.active_patch_id, queue_status.queue_name, queue_status.bot_id)
+ RecordPatchEvent.updated(queue_status.active_patch_id, queue_status.queue_name, queue_status.message, queue_status.bot_id)
self.response.out.write(queue_status.key().id())
Modified: trunk/Tools/QueueStatusServer/loggers/recordpatchevent.py (174290 => 174291)
--- trunk/Tools/QueueStatusServer/loggers/recordpatchevent.py 2014-10-03 21:18:12 UTC (rev 174290)
+++ trunk/Tools/QueueStatusServer/loggers/recordpatchevent.py 2014-10-03 21:35:16 UTC (rev 174291)
@@ -69,7 +69,7 @@
queue_log.put()
@classmethod
- def stopped(cls, attachment_id, queue_name, bot_id=None):
+ def stopped(cls, attachment_id, queue_name, status_message, bot_id=None):
patch_log = PatchLog.lookup_if_exists(attachment_id, queue_name)
if not patch_log:
WarningLog.record("patchlog missing", "In stopped event.", attachment_id, queue_name, bot_id)
@@ -84,6 +84,7 @@
patch_log.bot_id = bot_id
patch_log.finished = True
patch_log.calculate_process_duration()
+ patch_log.latest_message = status_message
patch_log.put()
queue_log = QueueLog.get_current(queue_name, queue_log_duration)
@@ -91,7 +92,7 @@
queue_log.put()
@classmethod
- def updated(cls, attachment_id, queue_name, bot_id=None):
+ def updated(cls, attachment_id, queue_name, status_message, bot_id=None):
patch_log = PatchLog.lookup_if_exists(attachment_id, queue_name)
if not patch_log:
WarningLog.record("patchlog missing", "In updated event.", attachment_id, queue_name, bot_id)
@@ -100,6 +101,7 @@
if bot_id:
patch_log.bot_id = bot_id
patch_log.status_update_count += 1
+ patch_log.latest_message = status_message
patch_log.put()
queue_log = QueueLog.get_current(queue_name, queue_log_duration)
Modified: trunk/Tools/QueueStatusServer/model/patchlog.py (174290 => 174291)
--- trunk/Tools/QueueStatusServer/model/patchlog.py 2014-10-03 21:18:12 UTC (rev 174290)
+++ trunk/Tools/QueueStatusServer/model/patchlog.py 2014-10-03 21:35:16 UTC (rev 174291)
@@ -41,6 +41,7 @@
finished = db.BooleanProperty(default=False)
wait_duration = db.IntegerProperty()
process_duration = db.IntegerProperty()
+ latest_message = db.StringProperty()
@classmethod
def lookup(cls, attachment_id, queue_name):