async def check_timestamp(self):
try:
- response = await self.backend.http_client.fetch(self.url + ".timestamp",
- headers={ "Pragma" : "no-cache" })
+ response = await self.backend.http_client.fetch(
+ self.url + ".timestamp",
+ headers = {
+ "Pragma" : "no-cache",
+ },
+
+ # We are really not very patient with this, because if the
+ # mirror cannot give us the timestamp swiftly, it is probably
+ # very overloaded and won't respond quickly to any file requests.
+ connect_timeout = 10,
+ request_timeout = 10,
+ )
except tornado.httpclient.HTTPError as e:
logging.warning("Error getting timestamp from %s: %s" % (self.hostname, e))
self.set_state("DOWN")
return
try:
- response = await self.backend.http_client.fetch(self.url + ".filelist",
- headers={ "Pragma" : "no-cache" })
+ response = await self.backend.http_client.fetch(
+ self.url + ".filelist",
+ headers = {
+ "Pragma" : "no-cache",
+ },
+
+ # Don't wait very long for this
+ connect_timeout = 10,
+ request_timeout = 10,
+ )
except tornado.httpclient.HTTPError as e:
logging.warning("Error getting filelist from %s: %s" % (self.hostname, e))
self.set_state("DOWN")