| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Subclasses of various slave command classes.""" | 5 """Subclasses of various slave command classes.""" |
| 6 | 6 |
| 7 from datetime import datetime | 7 from datetime import datetime |
| 8 import copy | 8 import copy |
| 9 import errno | 9 import errno |
| 10 import json | 10 import json |
| (...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1268 # buildset is added, then it is a success. This lambda function returns a | 1268 # buildset is added, then it is a success. This lambda function returns a |
| 1269 # tuple, which is received by addAsyncOpToCursor. | 1269 # tuple, which is received by addAsyncOpToCursor. |
| 1270 d.addCallback(lambda _: (builder.SUCCESS, None)) | 1270 d.addCallback(lambda _: (builder.SUCCESS, None)) |
| 1271 self.addAsyncOpToCursor( | 1271 self.addAsyncOpToCursor( |
| 1272 d, | 1272 d, |
| 1273 'Triggering build(s) on %s' % (', '.join(builder_names),)) | 1273 'Triggering build(s) on %s' % (', '.join(builder_names),)) |
| 1274 d.addErrback(handle_exception) | 1274 d.addErrback(handle_exception) |
| 1275 except Exception as ex: | 1275 except Exception as ex: |
| 1276 handle_exception(ex) | 1276 handle_exception(ex) |
| 1277 | 1277 |
| 1278 def CURRENT_TIMESTAMP(self, duration): |
| 1279 """Does nothing because buildbot master receives logs in real-time.""" |
| 1280 |
| 1278 @staticmethod | 1281 @staticmethod |
| 1279 def getPropertiesForTriggeredBuild(current_properties, new_properties): | 1282 def getPropertiesForTriggeredBuild(current_properties, new_properties): |
| 1280 props = { | 1283 props = { |
| 1281 'parent_buildername': current_properties.getProperty('buildername'), | 1284 'parent_buildername': current_properties.getProperty('buildername'), |
| 1282 'parent_buildnumber': current_properties.getProperty('buildnumber'), | 1285 'parent_buildnumber': current_properties.getProperty('buildnumber'), |
| 1283 } | 1286 } |
| 1284 props.update(new_properties) | 1287 props.update(new_properties) |
| 1285 return props | 1288 return props |
| 1286 | 1289 |
| 1287 @defer.inlineCallbacks | 1290 @defer.inlineCallbacks |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1582 and starts to wait for remaining steps to finish. Returns command_result | 1585 and starts to wait for remaining steps to finish. Returns command_result |
| 1583 as Deferred.""" | 1586 as Deferred.""" |
| 1584 self.scriptComplete(command_result) | 1587 self.scriptComplete(command_result) |
| 1585 steps_d = self.script_observer.waitForSteps() | 1588 steps_d = self.script_observer.waitForSteps() |
| 1586 # Ignore the waitForSteps' result and return the original result, | 1589 # Ignore the waitForSteps' result and return the original result, |
| 1587 # so the caller of runCommand receives command_result. | 1590 # so the caller of runCommand receives command_result. |
| 1588 steps_d.addCallback(lambda *_: command_result) | 1591 steps_d.addCallback(lambda *_: command_result) |
| 1589 return steps_d | 1592 return steps_d |
| 1590 d.addCallback(onCommandFinished) | 1593 d.addCallback(onCommandFinished) |
| 1591 return d | 1594 return d |
| OLD | NEW |