replace md5 => file

This commit is contained in:
Casper da Costa-Luis
2019-08-28 17:58:53 +01:00
parent 5f81352f90
commit 7be68d9448
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -650,16 +650,16 @@ class RemoteBASE(object):
desc="Querying "
+ ("cache in " + name if name else "remote cache"),
total=len(checksums),
unit="md5",
unit="file",
) as pbar:
def exists_with_progress(path_info):
ret = self.exists(path_info)
pbar.update()
pbar.update_desc(str(path_info))
return ret
with ThreadPoolExecutor(max_workers=jobs or self.JOBS) as executor:
path_infos = [self.checksum_to_path_info(x) for x in checksums]
path_infos = map(self.checksum_to_path_info, checksums)
in_remote = executor.map(exists_with_progress, path_infos)
ret = list(itertools.compress(checksums, in_remote))
return ret
+1 -1
View File
@@ -252,7 +252,7 @@ class RemoteLOCAL(RemoteBASE):
checksum
for checksum in Tqdm(
checksums,
unit="md5",
unit="file",
desc="Querying "
+ ("cache in " + name if name else "local cache"),
)
+1 -1
View File
@@ -271,7 +271,7 @@ class RemoteSSH(RemoteBASE):
desc="Querying "
+ ("cache in " + name if name else "remote cache"),
total=len(checksums),
unit="md5",
unit="file",
) as pbar:
def exists_with_progress(chunks):