less net i/o
This commit is contained in:
parent
a989842b3a
commit
df874cd202
1 changed files with 8 additions and 3 deletions
|
@ -251,12 +251,17 @@ class Client(object):
|
|||
if r['data']['info']:
|
||||
info = r['data']['info']
|
||||
max_info = 100
|
||||
for offset in range(0, len(info), max_info):
|
||||
post = {'info': {}}
|
||||
total = len(info)
|
||||
for offset in range(0, total, max_info):
|
||||
post = {'info': {}, 'upload': True}
|
||||
for oshash in info[offset:offset+max_info]:
|
||||
if oshash in files['info']:
|
||||
post['info'][oshash] = files['info'][oshash]
|
||||
print 'sending info for new files', len(post['info'])
|
||||
print 'sending info for new files', len(post['info']), offset, total
|
||||
r = self.api.update(post)
|
||||
|
||||
#send empty list to get updated list of requested info/files/data
|
||||
post = {'info': {}}
|
||||
r = self.api.update(post)
|
||||
|
||||
filenames = {}
|
||||
|
|
Loading…
Reference in a new issue