Fixing LFS upload

Summary:
This fixes lfs upload by avoiding use of workers. The perfect fix
would be to make handler work with the workers and multithreading, but that
is much more complex. The downlaoding has been working fine for 1.5 months now
without any reported issues so leaving that to use workers.

Reviewed By: quark-zju

Differential Revision: D6804951

fbshipit-source-id: d5ce92b35c5cbcd64174e47df7a19507c98ed64a
This commit is contained in:
Wojciech Lis 2018-01-25 14:55:34 -08:00 committed by Saurabh Singh
parent a3e8a19f3c
commit 9e3e4e85df

View File

@ -314,8 +314,12 @@ class _gitlfsremote(object):
continue
raise
oids = worker.worker(self.ui, 0.1, transfer, (),
sorted(objects, key=lambda o: o.get('oid')))
if action == 'download':
oids = worker.worker(self.ui, 0.1, transfer, (),
sorted(objects, key=lambda o: o.get('oid')))
else:
oids = transfer(objects)
processed = 0
for _one, oid in oids:
processed += sizes[oid]