|
@@ -75,7 +75,7 @@ def load_images_from_pdf(
|
|
|
), pdf_doc
|
|
), pdf_doc
|
|
|
else:
|
|
else:
|
|
|
# 根据进程数调整超时时间
|
|
# 根据进程数调整超时时间
|
|
|
- threads = min(os.cpu_count(), threads)
|
|
|
|
|
|
|
+ threads = min(os.cpu_count() or 1, threads)
|
|
|
timeout = timeout // threads
|
|
timeout = timeout // threads
|
|
|
|
|
|
|
|
end_page_id = get_end_page_id(end_page_id, len(pdf_doc))
|
|
end_page_id = get_end_page_id(end_page_id, len(pdf_doc))
|