dont fail if sever is down shortly

This commit is contained in:
j 2013-07-27 17:41:15 +02:00
parent 2500adde4b
commit a9e44a5983

View file

@ -18,8 +18,11 @@ class DistributedClient:
self.name = name self.name = name
def ping(self, oshash): def ping(self, oshash):
url = '%s/ping/%s/%s' % (self.url, oshash, self.name) try:
requests.get(url) url = '%s/ping/%s/%s' % (self.url, oshash, self.name)
requests.get(url)
except:
print 'cound not ping server'
def status(self, oshash, status): def status(self, oshash, status):
url = '%s/status/%s' % (self.url, oshash) url = '%s/status/%s' % (self.url, oshash)