4fa33a02 by 周伟奇

fix bug

1 parent 3f659eb8
......@@ -611,7 +611,7 @@ class Command(BaseCommand, LoggerMixin):
except Exception as e:
doc.status = DocStatus.UPLOAD_FAILED.value
doc.end_time = timezone.now()
doc.duration = (doc.start_time - doc.end_time).seconds
doc.duration = (doc.end_time - doc.start_time).seconds
for field, count in count_list:
if hasattr(doc, field):
setattr(doc, field, count)
......@@ -623,7 +623,7 @@ class Command(BaseCommand, LoggerMixin):
else:
doc.status = DocStatus.COMPLETE.value
doc.end_time = timezone.now()
doc.duration = (doc.start_time - doc.end_time).seconds
doc.duration = (doc.end_time - doc.start_time).seconds
for field, count in count_list:
if hasattr(doc, field):
setattr(doc, field, count)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!