OLD | NEW |
1 # Copyright 2014 The Swarming Authors. All rights reserved. | 1 # Copyright 2014 The LUCI Authors. All rights reserved. |
2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed by the Apache v2.0 license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Task execution result models. | 5 """Task execution result models. |
6 | 6 |
7 This module doesn't do the scheduling itself. It only describes the entities to | 7 This module doesn't do the scheduling itself. It only describes the entities to |
8 store tasks results. | 8 store tasks results. |
9 | 9 |
10 - TaskResultSummary represents the overall result for the TaskRequest taking in | 10 - TaskResultSummary represents the overall result for the TaskRequest taking in |
11 account retries. | 11 account retries. |
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 if tags: | 1080 if tags: |
1081 # Add TaskResultSummary indexes if desired. | 1081 # Add TaskResultSummary indexes if desired. |
1082 if sort != 'created_ts': | 1082 if sort != 'created_ts': |
1083 raise ValueError( | 1083 raise ValueError( |
1084 'Add needed indexes for sort:%s and tags if desired' % sort) | 1084 'Add needed indexes for sort:%s and tags if desired' % sort) |
1085 tags_filter = TaskResultSummary.tags == tags[0] | 1085 tags_filter = TaskResultSummary.tags == tags[0] |
1086 for tag in tags[1:]: | 1086 for tag in tags[1:]: |
1087 tags_filter = ndb.AND(tags_filter, TaskResultSummary.tags == tag) | 1087 tags_filter = ndb.AND(tags_filter, TaskResultSummary.tags == tag) |
1088 query = query.filter(tags_filter) | 1088 query = query.filter(tags_filter) |
1089 return _filter_query(TaskResultSummary, query, start, end, sort, state) | 1089 return _filter_query(TaskResultSummary, query, start, end, sort, state) |
OLD | NEW |