Merge branch 'feature/portal-reocr' into feature/uat-tmp
Showing
1 changed file
with
2 additions
and
1 deletions
... | @@ -1535,6 +1535,7 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -1535,6 +1535,7 @@ class Command(BaseCommand, LoggerMixin): |
1535 | self.online_log.info('{0} [pdf to img start] [task={1}] [times={2}]'.format( | 1535 | self.online_log.info('{0} [pdf to img start] [task={1}] [times={2}]'.format( |
1536 | self.log_base, task_str, times)) | 1536 | self.log_base, task_str, times)) |
1537 | start_time = time.time() | 1537 | start_time = time.time() |
1538 | max_img_count_or_none = None if re_ocr_flag == 'Y' else max_img_count | ||
1538 | pdf_handler.extract_image_for_weixin(max_img_count) | 1539 | pdf_handler.extract_image_for_weixin(max_img_count) |
1539 | end_time = time.time() | 1540 | end_time = time.time() |
1540 | speed_time = int(end_time - start_time) | 1541 | speed_time = int(end_time - start_time) |
... | @@ -1553,7 +1554,7 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -1553,7 +1554,7 @@ class Command(BaseCommand, LoggerMixin): |
1553 | self.online_log.warn('{0} [pdf to img failed (pdf img empty)] [task={1}]'.format( | 1554 | self.online_log.warn('{0} [pdf to img failed (pdf img empty)] [task={1}]'.format( |
1554 | self.log_base, task_str)) | 1555 | self.log_base, task_str)) |
1555 | raise Exception('pdf img empty') | 1556 | raise Exception('pdf img empty') |
1556 | elif pdf_handler.img_count >= max_img_count: | 1557 | elif re_ocr_flag == 'N' and pdf_handler.img_count >= max_img_count: |
1557 | self.online_log.info('{0} [too many pdf image] [task={1}] [img_count={2}]'.format( | 1558 | self.online_log.info('{0} [too many pdf image] [task={1}] [img_count={2}]'.format( |
1558 | self.log_base, task_str, pdf_handler.img_count)) | 1559 | self.log_base, task_str, pdf_handler.img_count)) |
1559 | 1560 | ... | ... |
-
Please register or sign in to post a comment