Commit 9232ec0a authored by Grégory Wisniewski's avatar Grégory Wisniewski

Client sleep a bit when no master are available, and a bit less when the master

found is not ready. 


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1124 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 193b7bd3
...@@ -407,6 +407,7 @@ class Application(object): ...@@ -407,6 +407,7 @@ class Application(object):
try: try:
self.trying_master_node = master_list[index] self.trying_master_node = master_list[index]
except IndexError: except IndexError:
sleep(1)
index = 0 index = 0
self.trying_master_node = master_list[0] self.trying_master_node = master_list[0]
index += 1 index += 1
...@@ -465,7 +466,7 @@ class Application(object): ...@@ -465,7 +466,7 @@ class Application(object):
# - needlessly bother the primary master every 5 seconds # - needlessly bother the primary master every 5 seconds
# (...per client) # (...per client)
# - have a sleep in the code (yuck !) # - have a sleep in the code (yuck !)
sleep(5) sleep(1)
if self.uuid is not None: if self.uuid is not None:
conn.lock() conn.lock()
try: try:
......
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