mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-18 23:38:18 +00:00
Correct magic-folder use of StorageFarmBroker
When landing the "connected enough" changes on master, we changed the API; this fixes up usage of it in magic-folder.
This commit is contained in:
@ -121,7 +121,6 @@ class Client(node.Node, pollmixin.PollMixin):
|
||||
}
|
||||
|
||||
def __init__(self, basedir="."):
|
||||
#print "Client.__init__(%r)" % (basedir,)
|
||||
node.Node.__init__(self, basedir)
|
||||
# All tub.registerReference must happen *after* we upcall, since
|
||||
# that's what does tub.setLocation()
|
||||
@ -374,11 +373,6 @@ class Client(node.Node, pollmixin.PollMixin):
|
||||
self.storage_broker = sb
|
||||
sb.setServiceParent(self)
|
||||
|
||||
connection_threshold = min(self.encoding_params["k"],
|
||||
self.encoding_params["happy"] + 1)
|
||||
helper = storage_client.ConnectedEnough(sb, connection_threshold)
|
||||
self.connected_enough_d = helper.when_connected_enough()
|
||||
|
||||
# utilize the loaded static server specifications
|
||||
for key, server in self.connections_config['servers'].items():
|
||||
eventually(self.storage_broker.got_static_announcement,
|
||||
@ -498,7 +492,13 @@ class Client(node.Node, pollmixin.PollMixin):
|
||||
s.startService()
|
||||
|
||||
# start processing the upload queue when we've connected to enough servers
|
||||
self.connected_enough_d.addCallback(lambda ign: s.ready())
|
||||
connection_threshold = min(self.encoding_params["k"],
|
||||
self.encoding_params["happy"] + 1)
|
||||
connected = storage_client.ConnectedEnough(
|
||||
self.storage_broker,
|
||||
connection_threshold,
|
||||
)
|
||||
connected.when_connected_enough().addCallback(lambda ign: s.ready())
|
||||
|
||||
def _check_exit_trigger(self, exit_trigger_file):
|
||||
if os.path.exists(exit_trigger_file):
|
||||
|
Reference in New Issue
Block a user