| OLD | NEW |
| 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 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 import os | 5 import os |
| 6 | 6 |
| 7 from buildbot import buildset | 7 from buildbot import buildset |
| 8 from buildbot.changes.changes import Change | 8 from buildbot.changes.changes import Change |
| 9 from buildbot.scheduler import BadJobfile | 9 from buildbot.scheduler import BadJobfile |
| 10 from buildbot.scheduler import TryBase # pylint: disable=W0611 | 10 from buildbot.scheduler import TryBase # pylint: disable=W0611 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 log.msg('%s reports a bad job connection' % (self)) | 99 log.msg('%s reports a bad job connection' % (self)) |
| 100 log.err() | 100 log.err() |
| 101 return http.BAD_REQUEST | 101 return http.BAD_REQUEST |
| 102 reason = "'%s' try job" % buildset_id | 102 reason = "'%s' try job" % buildset_id |
| 103 # Send one build request per builder, otherwise the cancelation logic | 103 # Send one build request per builder, otherwise the cancelation logic |
| 104 # doesn't work. | 104 # doesn't work. |
| 105 build_sets = [] | 105 build_sets = [] |
| 106 assert isinstance(builder_names, list) | 106 assert isinstance(builder_names, list) |
| 107 for builder_name in builder_names: | 107 for builder_name in builder_names: |
| 108 build_set = buildset.BuildSet( | 108 build_set = buildset.BuildSet( |
| 109 [builder_name], | 109 builder_name.split(':', 1)[0:1], |
| 110 jobstamp, | 110 jobstamp, |
| 111 reason=reason, | 111 reason=reason, |
| 112 bsid=buildset_id, | 112 bsid=buildset_id, |
| 113 properties=props) | 113 properties=self.parse_decoration(props, |
| 114 ''.join(builder_name.split(':', 1)[1:]))) |
| 114 build_sets.append(build_set) | 115 build_sets.append(build_set) |
| 115 self.CancelJobsMatching(build_set, builder_name) | 116 self.CancelJobsMatching(build_set, builder_name) |
| 116 for build_set in build_sets: | 117 for build_set in build_sets: |
| 117 # Type inference error. | 118 # Type inference error. |
| 118 # pylint: disable=E1101 | 119 # pylint: disable=E1101 |
| 119 self.parent.submitBuildSet(build_set) | 120 self.parent.submitBuildSet(build_set) |
| 120 return http.OK | 121 return http.OK |
| OLD | NEW |