File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -341,9 +341,11 @@ def _process(
341
341
file_mode = self ._file_mode ,
342
342
)
343
343
status = STATUS_DELETED
344
+ desc = "Pulling"
344
345
else :
345
346
func = remote .upload
346
347
status = STATUS_NEW
348
+ desc = "Pushing"
347
349
348
350
if jobs is None :
349
351
jobs = remote .JOBS
@@ -361,11 +363,13 @@ def _process(
361
363
if len (plans [0 ]) == 0 :
362
364
return 0
363
365
364
- if jobs > 1 :
365
- with ThreadPoolExecutor (max_workers = jobs ) as executor :
366
- fails = sum (executor .map (func , * plans ))
367
- else :
368
- fails = sum (map (func , * plans ))
366
+ with Tqdm (total = len (plans [0 ]), unit = "file" , desc = desc ) as pbar :
367
+ func = pbar .wrap_fn (func )
368
+ if jobs > 1 :
369
+ with ThreadPoolExecutor (max_workers = jobs ) as executor :
370
+ fails = sum (executor .map (func , * plans ))
371
+ else :
372
+ fails = sum (map (func , * plans ))
369
373
370
374
if fails :
371
375
if download :
You can’t perform that action at this time.
0 commit comments