c011a3cd by 周伟奇

fix bug

1 parent 36ca3f9a
......@@ -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()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!