Skip to content

Commit

Permalink
Insert a small pause...
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-vessey committed Sep 19, 2011
1 parent 7569a4b commit f0b113c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/fcrepo/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import httplib
import urlparse
import logging
from time import sleep

class APIException(Exception):
""" An exception in the general usage of the API """
Expand Down Expand Up @@ -96,6 +97,7 @@ def open(self, url, body='', headers=None, method='GET',):
else:
logging.exception('Got HTTP code %s in open... Retrying...' % e.httpcode)
self._reconnect()
sleep(5)
if not self.persistent:
self.close()

Expand Down

0 comments on commit f0b113c

Please sign in to comment.