fix task cancling bug (#98)

This commit is contained in:
KevinHuSh
2024-03-05 16:33:47 +08:00
committed by GitHub
parent 07d76ea18d
commit 602038ac49
11 changed files with 24 additions and 15 deletions

View File

@ -57,7 +57,7 @@ class Pdf(PdfParser):
to_page,
callback
)
callback("OCR finished")
callback(msg="OCR finished")
from timeit import default_timer as timer
start = timer()
@ -135,6 +135,6 @@ def chunk(filename, binary=None, from_page=0, to_page=100000, lang="Chinese", ca
if __name__ == "__main__":
import sys
def dummy(a, b):
def dummy(prog=None, msg=""):
pass
chunk(sys.argv[1], callback=dummy)