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 """Defines the mapreduces, which are used to do one-off mass updates on entities | 5 """Defines the mapreduces, which are used to do one-off mass updates on entities |
6 and other manually triggered maintenance tasks. | 6 and other manually triggered maintenance tasks. |
7 | 7 |
8 Automatically triggered maintenance tasks should use a task queue on the backend | 8 Automatically triggered maintenance tasks should use a task queue on the backend |
9 instead. | 9 instead. |
10 """ | 10 """ |
11 | 11 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 the task, each one individually encoded as a JSON string. | 213 the task, each one individually encoded as a JSON string. |
214 """ | 214 """ |
215 for labels_json in labels_json_list: | 215 for labels_json in labels_json_list: |
216 try: | 216 try: |
217 labels = json.loads(labels_json) | 217 labels = json.loads(labels_json) |
218 logging.info('Reducing %s: %s', test_name, | 218 logging.info('Reducing %s: %s', test_name, |
219 json.dumps(labels, indent=2, separators=(',', ': '))) | 219 json.dumps(labels, indent=2, separators=(',', ': '))) |
220 # TODO(smut): Do something with this information. Store it somewhere. | 220 # TODO(smut): Do something with this information. Store it somewhere. |
221 except (IOError, ValueError): | 221 except (IOError, ValueError): |
222 logging.error('Invalid labels for %s: %s', test_name, labels_json) | 222 logging.error('Invalid labels for %s: %s', test_name, labels_json) |
OLD | NEW |