| OLD | NEW |
| 1 # Copyright 2014 The LUCI 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 under the Apache License, Version 2.0 |
| 3 # found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 """Queries for incremental mapping.""" | 5 """Queries for incremental mapping.""" |
| 6 | 6 |
| 7 from google.appengine.ext import ndb | 7 from google.appengine.ext import ndb |
| 8 | 8 |
| 9 | 9 |
| 10 __all__ = [ | 10 __all__ = [ |
| 11 'incremental_map', | 11 'incremental_map', |
| 12 'page_queries', | 12 'page_queries', |
| 13 'pop_future_done', | 13 'pop_future_done', |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 while len(items_to_process) >= map_page_size: | 94 while len(items_to_process) >= map_page_size: |
| 95 items_to_process = _process_chunk_of_items( | 95 items_to_process = _process_chunk_of_items( |
| 96 map_fn, action_futures, items_to_process, max_inflight, map_page_size) | 96 map_fn, action_futures, items_to_process, max_inflight, map_page_size) |
| 97 | 97 |
| 98 while items_to_process: | 98 while items_to_process: |
| 99 items_to_process = _process_chunk_of_items( | 99 items_to_process = _process_chunk_of_items( |
| 100 map_fn, action_futures, items_to_process, max_inflight, map_page_size) | 100 map_fn, action_futures, items_to_process, max_inflight, map_page_size) |
| 101 | 101 |
| 102 ndb.Future.wait_all(action_futures) | 102 ndb.Future.wait_all(action_futures) |
| 103 | 103 |
| OLD | NEW |