b8bcd0dd by 周伟奇

fix ocr_1 logger

1 parent d2a39b3f
...@@ -116,7 +116,7 @@ class Command(BaseCommand, LoggerMixin): ...@@ -116,7 +116,7 @@ class Command(BaseCommand, LoggerMixin):
116 start_time = time.time() 116 start_time = time.time()
117 ocr_response = requests.post(self.ocr_url, json=json_data) 117 ocr_response = requests.post(self.ocr_url, json=json_data)
118 if ocr_response.status_code != 200: 118 if ocr_response.status_code != 200:
119 raise OCR1Exception('{0} ocr status code: {0}'.format(self.log_base, ocr_response.status_code)) 119 raise OCR1Exception('{0} ocr status code: {1}'.format(self.log_base, ocr_response.status_code))
120 except Exception as e: 120 except Exception as e:
121 self.folder_log.warn('{0} [ocr failed] [times={1}] [img_path={2}] [error={3}]'.format( 121 self.folder_log.warn('{0} [ocr failed] [times={1}] [img_path={2}] [error={3}]'.format(
122 self.log_base, times, img_path, traceback.format_exc())) 122 self.log_base, times, img_path, traceback.format_exc()))
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!