6549cd76 by 冯轩

FIX bug

1 parent 5b7f2e36
...@@ -108,11 +108,11 @@ class Command(BaseCommand, LoggerMixin): ...@@ -108,11 +108,11 @@ class Command(BaseCommand, LoggerMixin):
108 if zip_doc is None: 108 if zip_doc is None:
109 self.online_log.warn('{0} [zip_2_pdfs] [doc not exist] [task_str={1}]'.format( 109 self.online_log.warn('{0} [zip_2_pdfs] [doc not exist] [task_str={1}]'.format(
110 self.log_base, task_str)) 110 self.log_base, task_str))
111 return None, business_type 111 return None, business_type, None
112 elif zip_doc.status != DocStatus.INIT.value: 112 elif zip_doc.status != DocStatus.INIT.value:
113 self.online_log.warn('{0} [zip_2_pdfs] [doc status error] [task_str={1}] [doc_status={2}]'.format( 113 self.online_log.warn('{0} [zip_2_pdfs] [doc status error] [task_str={1}] [doc_status={2}]'.format(
114 self.log_base, task_str, zip_doc.status)) 114 self.log_base, task_str, zip_doc.status))
115 return None, business_type 115 return None, business_type, None
116 116
117 zip_doc.status = DocStatus.PROCESSING.value 117 zip_doc.status = DocStatus.PROCESSING.value
118 zip_doc.start_time = timezone.now() 118 zip_doc.start_time = timezone.now()
...@@ -120,7 +120,7 @@ class Command(BaseCommand, LoggerMixin): ...@@ -120,7 +120,7 @@ class Command(BaseCommand, LoggerMixin):
120 except Exception as e: 120 except Exception as e:
121 self.online_log.error('{0} [process error (zip_2_pdfs)] [error={1}]'.format( 121 self.online_log.error('{0} [process error (zip_2_pdfs)] [error={1}]'.format(
122 self.log_base, traceback.format_exc())) 122 self.log_base, traceback.format_exc()))
123 return None, None 123 return None, None, None
124 else: 124 else:
125 self.online_log.info('{0} [zip_2_pdfs] [db save end] [task_str={1}]'.format( 125 self.online_log.info('{0} [zip_2_pdfs] [db save end] [task_str={1}]'.format(
126 self.log_base, task_str)) 126 self.log_base, task_str))
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!