|
Lines 50-60
class ReleasePatch(UpdateBase):
Tools/QueueStatusServer/handlers/releasepatch.py_sec1
|
| 50 |
attachment_id = self._int_from_request("attachment_id") |
50 |
attachment_id = self._int_from_request("attachment_id") |
| 51 |
attachment = Attachment(attachment_id) |
51 |
attachment = Attachment(attachment_id) |
| 52 |
last_status = attachment.status_for_queue(queue) |
52 |
last_status = attachment.status_for_queue(queue) |
|
|
53 |
message = "" |
| 54 |
if last_status: |
| 55 |
message = last_status.message |
| 53 |
|
56 |
|
| 54 |
# Ideally we should use a transaction for the calls to |
57 |
# Ideally we should use a transaction for the calls to |
| 55 |
# WorkItems and ActiveWorkItems. |
58 |
# WorkItems and ActiveWorkItems. |
| 56 |
|
59 |
|
| 57 |
queue.work_items().remove_work_item(attachment_id) |
60 |
queue.work_items().remove_work_item(attachment_id) |
| 58 |
RecordPatchEvent.stopped(attachment_id, queue_name, last_status.message) |
61 |
RecordPatchEvent.stopped(attachment_id, queue_name, message) |
| 59 |
|
62 |
|
| 60 |
queue.active_work_items().expire_item(attachment_id) |
63 |
queue.active_work_items().expire_item(attachment_id) |