10517722 by 冯轩

Merge branch 'feature/portal-reocr' into feature/uat-tmp

2 parents a319edef 51097b47
......@@ -1535,6 +1535,7 @@ class Command(BaseCommand, LoggerMixin):
self.online_log.info('{0} [pdf to img start] [task={1}] [times={2}]'.format(
self.log_base, task_str, times))
start_time = time.time()
max_img_count_or_none = None if re_ocr_flag == 'Y' else max_img_count
pdf_handler.extract_image_for_weixin(max_img_count)
end_time = time.time()
speed_time = int(end_time - start_time)
......@@ -1553,7 +1554,7 @@ class Command(BaseCommand, LoggerMixin):
self.online_log.warn('{0} [pdf to img failed (pdf img empty)] [task={1}]'.format(
self.log_base, task_str))
raise Exception('pdf img empty')
elif pdf_handler.img_count >= max_img_count:
elif re_ocr_flag == 'N' and pdf_handler.img_count >= max_img_count:
self.online_log.info('{0} [too many pdf image] [task={1}] [img_count={2}]'.format(
self.log_base, task_str, pdf_handler.img_count))
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!