| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import datetime | 5 import datetime |
| 6 import functools | 6 import functools |
| 7 | 7 |
| 8 from recipe_engine.types import freeze | 8 from infra.libs.infra_types import freeze |
| 9 from recipe_engine import recipe_api | 9 from recipe_engine import recipe_api |
| 10 | 10 |
| 11 | 11 |
| 12 # Minimally supported version of swarming.py script (reported by --version). | 12 # Minimally supported version of swarming.py script (reported by --version). |
| 13 MINIMAL_SWARMING_VERSION = (0, 4, 10) | 13 MINIMAL_SWARMING_VERSION = (0, 4, 10) |
| 14 | 14 |
| 15 | 15 |
| 16 def parse_time(value): | 16 def parse_time(value): |
| 17 """Converts serialized time from the API to datetime.datetime.""" | 17 """Converts serialized time from the API to datetime.datetime.""" |
| 18 # When microseconds are 0, the '.123456' suffix is elided. This means the | 18 # When microseconds are 0, the '.123456' suffix is elided. This means the |
| (...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 | 827 |
| 828 def get_shard_view_url(self, index): | 828 def get_shard_view_url(self, index): |
| 829 """Returns URL of HTML page with shard details or None if not available. | 829 """Returns URL of HTML page with shard details or None if not available. |
| 830 | 830 |
| 831 Works only after the task has been successfully triggered. | 831 Works only after the task has been successfully triggered. |
| 832 """ | 832 """ |
| 833 if self._trigger_output and self._trigger_output.get('tasks'): | 833 if self._trigger_output and self._trigger_output.get('tasks'): |
| 834 for shard_dict in self._trigger_output['tasks'].itervalues(): | 834 for shard_dict in self._trigger_output['tasks'].itervalues(): |
| 835 if shard_dict['shard_index'] == index: | 835 if shard_dict['shard_index'] == index: |
| 836 return shard_dict['view_url'] | 836 return shard_dict['view_url'] |
| OLD | NEW |