mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
58ade2a9ef
commit
72f8f897ea
@ -108,10 +108,10 @@ def download_one(tdir, timeout, progress_report, url):
|
||||
except Exception as err:
|
||||
return False, url, as_unicode(err)
|
||||
|
||||
def download_external_resoures(container, urls, timeout=60, progress_report=lambda url, done, total: None):
|
||||
def download_external_resources(container, urls, timeout=60, progress_report=lambda url, done, total: None):
|
||||
failures = {}
|
||||
replacements = {}
|
||||
with TemporaryDirectory('editor_download') as tdir:
|
||||
with TemporaryDirectory('editor-download') as tdir:
|
||||
pool = Pool(10)
|
||||
with closing(pool):
|
||||
for ok, result in pool.imap_unordered(partial(download_one, tdir, timeout, progress_report), urls):
|
||||
|
Loading…
x
Reference in New Issue
Block a user