OLD | NEW |
1 # Copyright 2015 The LUCI Authors. All rights reserved. | 1 # Copyright 2015 The LUCI Authors. All rights reserved. |
2 # Use of this source code is governed under the Apache License, Version 2.0 | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
3 # that can be found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
4 | 4 |
5 """Internal bot API handlers.""" | 5 """Internal bot API handlers.""" |
6 | 6 |
7 import base64 | 7 import base64 |
8 import json | 8 import json |
9 import logging | 9 import logging |
10 import re | 10 import re |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 'extra_args': request.properties.extra_args, | 546 'extra_args': request.properties.extra_args, |
547 'grace_period': request.properties.grace_period_secs, | 547 'grace_period': request.properties.grace_period_secs, |
548 'hard_timeout': request.properties.execution_timeout_secs, | 548 'hard_timeout': request.properties.execution_timeout_secs, |
549 'host': utils.get_versioned_hosturl(), | 549 'host': utils.get_versioned_hosturl(), |
550 'io_timeout': request.properties.io_timeout_secs, | 550 'io_timeout': request.properties.io_timeout_secs, |
551 'isolated': { | 551 'isolated': { |
552 'input': request.properties.inputs_ref.isolated, | 552 'input': request.properties.inputs_ref.isolated, |
553 'namespace': request.properties.inputs_ref.namespace, | 553 'namespace': request.properties.inputs_ref.namespace, |
554 'server': request.properties.inputs_ref.isolatedserver, | 554 'server': request.properties.inputs_ref.isolatedserver, |
555 } if request.properties.inputs_ref else None, | 555 } if request.properties.inputs_ref else None, |
| 556 'outputs': request.properties.outputs, |
556 'service_account': request.service_account, | 557 'service_account': request.service_account, |
557 'task_id': task_pack.pack_run_result_key(run_result_key), | 558 'task_id': task_pack.pack_run_result_key(run_result_key), |
558 }, | 559 }, |
559 } | 560 } |
560 self.send_response(utils.to_json_encodable(out)) | 561 self.send_response(utils.to_json_encodable(out)) |
561 | 562 |
562 def _cmd_sleep(self, sleep_streak, quarantined): | 563 def _cmd_sleep(self, sleep_streak, quarantined): |
563 out = { | 564 out = { |
564 'cmd': 'sleep', | 565 'cmd': 'sleep', |
565 'duration': task_scheduler.exponential_backoff(sleep_streak), | 566 'duration': task_scheduler.exponential_backoff(sleep_streak), |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 ('/swarming/api/v1/bot/poll', BotPollHandler), | 856 ('/swarming/api/v1/bot/poll', BotPollHandler), |
856 ('/swarming/api/v1/bot/server_ping', ServerPingHandler), | 857 ('/swarming/api/v1/bot/server_ping', ServerPingHandler), |
857 ('/swarming/api/v1/bot/task_update', BotTaskUpdateHandler), | 858 ('/swarming/api/v1/bot/task_update', BotTaskUpdateHandler), |
858 ('/swarming/api/v1/bot/task_update/<task_id:[a-f0-9]+>', | 859 ('/swarming/api/v1/bot/task_update/<task_id:[a-f0-9]+>', |
859 BotTaskUpdateHandler), | 860 BotTaskUpdateHandler), |
860 ('/swarming/api/v1/bot/task_error', BotTaskErrorHandler), | 861 ('/swarming/api/v1/bot/task_error', BotTaskErrorHandler), |
861 ('/swarming/api/v1/bot/task_error/<task_id:[a-f0-9]+>', | 862 ('/swarming/api/v1/bot/task_error/<task_id:[a-f0-9]+>', |
862 BotTaskErrorHandler), | 863 BotTaskErrorHandler), |
863 ] | 864 ] |
864 return [webapp2.Route(*i) for i in routes] | 865 return [webapp2.Route(*i) for i in routes] |
OLD | NEW |