Commit 102d46ac authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent c65e14a6
......@@ -221,8 +221,7 @@ class ClusterPdb(object):
def wait(self, test, timeout):
end_time = time() + timeout
#period = 0.1
period = 0.05
period = 0.1
while not test():
cluster_dict.acquire()
try:
......@@ -233,12 +232,11 @@ class ClusterPdb(object):
next_sleep = max(last_pdb + timeout, end_time) - time()
if next_sleep > period:
next_sleep = period
#period *= 1.5
period *= 1.5
elif next_sleep < 0:
return False
finally:
cluster_dict.release()
#print 'next_sleep:', next_sleep
sleep(next_sleep)
return True
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment