Skip to content

Commit

Permalink
Reduce sleep time for first request
Browse files Browse the repository at this point in the history
  • Loading branch information
rylans committed Jan 30, 2015
1 parent 6313676 commit 05d8489
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hnapi/connectors/api_connector.py
Expand Up @@ -91,7 +91,7 @@ def request(self, url):
ex = RuntimeError()
while this_try < self.max_retries:
try:
sleep_time = self.backoff_multiplier * (2**this_try)
sleep_time = self.backoff_multiplier * ((2**this_try) - 1)
self.logger.debug("Sleeping for %s seconds", str(sleep_time))
time.sleep(sleep_time)
return self.__request(url)
Expand Down

0 comments on commit 05d8489

Please sign in to comment.