OLD | NEW |
1 # Copyright 2015 The Swarming Authors. All rights reserved. | 1 # Copyright 2015 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 """This module defines Swarming Server endpoints handlers.""" | 5 """This module defines Swarming Server endpoints handlers.""" |
6 | 6 |
7 import datetime | 7 import datetime |
8 import json | 8 import json |
9 import logging | 9 import logging |
10 | 10 |
11 from google.appengine.api import datastore_errors | 11 from google.appengine.api import datastore_errors |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 """ | 558 """ |
559 logging.info('%s', request) | 559 logging.info('%s', request) |
560 now = utils.utcnow() | 560 now = utils.utcnow() |
561 q = bot_management.BotInfo.query().order(bot_management.BotInfo.key) | 561 q = bot_management.BotInfo.query().order(bot_management.BotInfo.key) |
562 bots, cursor = datastore_utils.fetch_page(q, request.limit, request.cursor) | 562 bots, cursor = datastore_utils.fetch_page(q, request.limit, request.cursor) |
563 return swarming_rpcs.BotList( | 563 return swarming_rpcs.BotList( |
564 cursor=cursor, | 564 cursor=cursor, |
565 death_timeout=config.settings().bot_death_timeout_secs, | 565 death_timeout=config.settings().bot_death_timeout_secs, |
566 items=[message_conversion.bot_info_to_rpc(bot, now) for bot in bots], | 566 items=[message_conversion.bot_info_to_rpc(bot, now) for bot in bots], |
567 now=now) | 567 now=now) |
OLD | NEW |