Home | History | Annotate | Download | only in webkitpy

Lines Matching full:self

40     def __init__(self, initial_backoff_seconds=10, grown_factor=1.1, timeout_seconds=5*60*60):
41 self._initial_backoff_seconds = initial_backoff_seconds
42 self._grown_factor = grown_factor
43 self._timeout_seconds = timeout_seconds
45 def run(self, request):
46 self._total_sleep = 0
47 self._backoff_seconds = self._initial_backoff_seconds
52 self._check_for_timeout()
53 log("Received HTTP status %s from server. Retrying in %s seconds..." % (e.code, self._backoff_seconds))
54 self._sleep()
56 def _check_for_timeout(self):
57 if self._total_sleep + self._backoff_seconds > self._timeout_seconds:
60 def _sleep(self):
61 time.sleep(self._backoff_seconds)
62 self._total_sleep += self._backoff_seconds
63 self._backoff_seconds *= self._grown_factor