Chromium Code Reviews| Index: appengine/cr-buildbucket/swarming/swarming.py |
| diff --git a/appengine/cr-buildbucket/swarming/swarming.py b/appengine/cr-buildbucket/swarming/swarming.py |
| index ae815c0b96bff3de847725c72c03913e2a2c6665..da716d06c16c3618c6f44255a7a03dabb060425c 100644 |
| --- a/appengine/cr-buildbucket/swarming/swarming.py |
| +++ b/appengine/cr-buildbucket/swarming/swarming.py |
| @@ -304,7 +304,11 @@ def create_task_async(build): |
| # Mark the build as leased. |
| assert 'expiration_secs' in task, task |
| + # task['expiration_secs'] is max time for the task to be pending |
| task_expiration = datetime.timedelta(seconds=int(task['expiration_secs'])) |
| + # task['execution_timeout_secs'] is max time for the task to run |
| + task_expiration += datetime.timedelta( |
| + seconds=int(task['properties']['execution_timeout_secs'])) |
| extra_time = datetime.timedelta(hours=1) |
|
Vadim Sh.
2016/06/22 00:09:44
it already included extra hour...
nodir
2016/06/22 00:15:45
removed it and added hour to task_expiration
|
| build.lease_expiration_date = utils.utcnow() + task_expiration + extra_time |
| build.regenerate_lease_key() |