From d3604a9a53a04af8c34d08f17b4708c460f76be9 Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Fri, 8 Apr 2016 16:52:04 -0400 Subject: compare vshyba/develop: no gain for big downloads!!?? --- soledad_sync.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'soledad_sync.py') diff --git a/soledad_sync.py b/soledad_sync.py index 1cc22a3..136b02c 100644 --- a/soledad_sync.py +++ b/soledad_sync.py @@ -6,7 +6,8 @@ from twisted.internet import defer UUID = 'deadbeef' HOST = 'http://futeisha:2323' # HOST = 'http://localhost:2323' -NUM_DOCS = 20 +#NUM_DOCS = 20 +NUM_DOCS = 1 PAYLOAD = '/tmp/payload' # ------------------------------------------------------ @@ -31,14 +32,11 @@ def onSyncDone(result): print "SYNC DONE!", result -def upload_soledad_stuff(): +def upload_soledad_stuff(s): with open(PAYLOAD, 'r') as f: payload = f.read() - s = _get_soledad_instance_from_uuid( - UUID, 'pass', '/tmp/soledadsync', HOST, '', '') - def do_sync(_): d = s.sync() d.addCallback(onSyncDone) @@ -49,7 +47,7 @@ def upload_soledad_stuff(): cd.append(s.create_doc({'payload': payload})) d1 = defer.gatherResults(cd) - # XXX nuking out the actual sync - #d1.addCallback(do_sync) + # XXX comment out to nuke out the actual sync + d1.addCallback(do_sync) return d1 -- cgit v1.2.3