diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2016-04-08 16:52:04 -0400 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2016-04-08 16:52:04 -0400 |
commit | d3604a9a53a04af8c34d08f17b4708c460f76be9 (patch) | |
tree | 9cff7b82040cfd191ae5121a69d7d24d67850415 /soledad_sync.py | |
parent | 0ea8b94f67741245d2554bb61b45b5c0ad51dc07 (diff) |
compare vshyba/develop: no gain for big downloads!!??
Diffstat (limited to 'soledad_sync.py')
-rw-r--r-- | soledad_sync.py | 12 |
1 files changed, 5 insertions, 7 deletions
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 |