From c011a3cdd1890bcaa640b10b213aff13f14e6e70 Mon Sep 17 00:00:00 2001 From: 周伟奇 <zhouweiqi@situdata.com> Date: Wed, 26 Jan 2022 18:59:17 +0800 Subject: [PATCH] fix bug --- src/apps/doc/management/commands/ocr_process.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/doc/management/commands/ocr_process.py b/src/apps/doc/management/commands/ocr_process.py index d75bf26..9eee09e 100644 --- a/src/apps/doc/management/commands/ocr_process.py +++ b/src/apps/doc/management/commands/ocr_process.py @@ -93,7 +93,7 @@ class Command(BaseCommand, LoggerMixin): task_str, is_priority = rh.dequeue() if task_str is None: self.online_log.info('{0} [get_doc_info] [queue empty]'.format(self.log_base)) - return None, None, None, None, None + return None, None, None, None self.online_log.info('{0} [get_doc_info] [task={1}] [is_priority={2}]'.format( self.log_base, task_str, is_priority)) @@ -114,11 +114,11 @@ class Command(BaseCommand, LoggerMixin): if doc is None: self.online_log.warn('{0} [get_doc_info] [doc not exist] [task_str={1}] [is_priority={2}]'.format( self.log_base, task_str, is_priority)) - return None, None, None, None, None + return None, None, None, None elif doc.status != DocStatus.INIT.value: self.online_log.warn('{0} [get_doc_info] [doc status error] [task_str={1}] [is_priority={2}] ' '[doc_status={3}]'.format(self.log_base, task_str, is_priority, doc.status)) - return None, None, None, None, None + return None, None, None, None doc.status = DocStatus.PROCESSING.value doc.start_time = timezone.now() doc.save() -- libgit2 0.24.0