OLD | NEW |
1 # Copyright 2013 The Swarming Authors. All rights reserved. | 1 # Copyright 2013 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 96 |
97 | 97 |
98 def delete_broken_entries(entry): | 98 def delete_broken_entries(entry): |
99 """Mapper that deletes ContentEntry entities that are broken.""" | 99 """Mapper that deletes ContentEntry entities that are broken.""" |
100 if not is_good_content_entry(entry): | 100 if not is_good_content_entry(entry): |
101 # MR framework disables memcache on a context level. Explicitly request | 101 # MR framework disables memcache on a context level. Explicitly request |
102 # to cleanup memcache, otherwise the rest of the isolate service will still | 102 # to cleanup memcache, otherwise the rest of the isolate service will still |
103 # think that entity exists. | 103 # think that entity exists. |
104 entry.key.delete(use_memcache=True) | 104 entry.key.delete(use_memcache=True) |
105 logging.error('MR: deleted bad entry\n%s', entry.key.id()) | 105 logging.error('MR: deleted bad entry\n%s', entry.key.id()) |
OLD | NEW |