fix bug
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -611,7 +611,7 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -611,7 +611,7 @@ class Command(BaseCommand, LoggerMixin): |
611 | except Exception as e: | 611 | except Exception as e: |
612 | doc.status = DocStatus.UPLOAD_FAILED.value | 612 | doc.status = DocStatus.UPLOAD_FAILED.value |
613 | doc.end_time = timezone.now() | 613 | doc.end_time = timezone.now() |
614 | doc.duration = (doc.start_time - doc.end_time).seconds | 614 | doc.duration = (doc.end_time - doc.start_time).seconds |
615 | for field, count in count_list: | 615 | for field, count in count_list: |
616 | if hasattr(doc, field): | 616 | if hasattr(doc, field): |
617 | setattr(doc, field, count) | 617 | setattr(doc, field, count) |
... | @@ -623,7 +623,7 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -623,7 +623,7 @@ class Command(BaseCommand, LoggerMixin): |
623 | else: | 623 | else: |
624 | doc.status = DocStatus.COMPLETE.value | 624 | doc.status = DocStatus.COMPLETE.value |
625 | doc.end_time = timezone.now() | 625 | doc.end_time = timezone.now() |
626 | doc.duration = (doc.start_time - doc.end_time).seconds | 626 | doc.duration = (doc.end_time - doc.start_time).seconds |
627 | for field, count in count_list: | 627 | for field, count in count_list: |
628 | if hasattr(doc, field): | 628 | if hasattr(doc, field): |
629 | setattr(doc, field, count) | 629 | setattr(doc, field, count) | ... | ... |
-
Please register or sign in to post a comment