OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 # that can be found in the LICENSE file. |
4 | 4 |
5 import logging | 5 import logging |
6 import os | 6 import os |
7 import random | 7 import random |
8 import sys | 8 import sys |
9 import time | 9 import time |
10 | 10 |
11 import httplib2 | 11 import httplib2 |
12 | 12 |
13 import infra_libs | 13 import infra_libs |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 self.endpoint, response.status, attempt) | 260 self.endpoint, response.status, attempt) |
261 | 261 |
262 if attempt == 0: | 262 if attempt == 0: |
263 logging.error('data: %s', str(events)[:200]) | 263 logging.error('data: %s', str(events)[:200]) |
264 | 264 |
265 self._sleep_fn(backoff_time(attempt, retry_backoff=self.retry_backoff)) | 265 self._sleep_fn(backoff_time(attempt, retry_backoff=self.retry_backoff)) |
266 | 266 |
267 logging.error('failed to POST data after %d attempts, giving up.', | 267 logging.error('failed to POST data after %d attempts, giving up.', |
268 attempt+1) | 268 attempt+1) |
269 return False | 269 return False |
OLD | NEW |