dont fail if sever is down shortly
This commit is contained in:
parent
2500adde4b
commit
a9e44a5983
1 changed files with 5 additions and 2 deletions
|
@ -18,8 +18,11 @@ class DistributedClient:
|
|||
self.name = name
|
||||
|
||||
def ping(self, oshash):
|
||||
try:
|
||||
url = '%s/ping/%s/%s' % (self.url, oshash, self.name)
|
||||
requests.get(url)
|
||||
except:
|
||||
print 'cound not ping server'
|
||||
|
||||
def status(self, oshash, status):
|
||||
url = '%s/status/%s' % (self.url, oshash)
|
||||
|
|
Loading…
Reference in a new issue