e80661aa by 周伟奇

small int limit

1 parent 4fa33a02
...@@ -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.end_time - doc.start_time).seconds 614 doc.duration = min((doc.end_time - doc.start_time).seconds, 32760)
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.end_time - doc.start_time).seconds 626 doc.duration = min((doc.end_time - doc.start_time).seconds, 32760)
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)
......
1 [settings] 1 [settings]
2 DEBUG = False 2 DEBUG = False
3 SLEEP_SECOND_DOC_GET = 2 3 SLEEP_SECOND_DOC_GET = 2
4 SLEEP_SECOND_IMG_PUT = 1 4 SLEEP_SECOND_IMG_PUT = 2
5 SLEEP_SECOND_IMG_GET = 0.5 5 SLEEP_SECOND_IMG_GET = 0.5
6 SLEEP_SECOND_TASK_GET = 1 6 SLEEP_SECOND_TASK_GET = 2
7 IMG_QUEUE_SIZE = 500 7 IMG_QUEUE_SIZE = 500
8 8
9 EDMS_DOWNLOAD_URL = https://edms-test.bmw.com/FH/FileHold/DocumentRepository/DownloadHandler.ashx 9 EDMS_DOWNLOAD_URL = https://edms-test.bmw.com/FH/FileHold/DocumentRepository/DownloadHandler.ashx
......
1 [settings] 1 [settings]
2 DEBUG = True 2 DEBUG = True
3 SLEEP_SECOND_DOC_GET = 10 3 SLEEP_SECOND_DOC_GET = 10
4 SLEEP_SECOND_IMG_PUT = 1 4 SLEEP_SECOND_IMG_PUT = 2
5 SLEEP_SECOND_IMG_GET = 0.5 5 SLEEP_SECOND_IMG_GET = 0.5
6 SLEEP_SECOND_TASK_GET = 2 6 SLEEP_SECOND_TASK_GET = 2
7 IMG_QUEUE_SIZE = 500 7 IMG_QUEUE_SIZE = 500
......
1 [settings] 1 [settings]
2 DEBUG = False 2 DEBUG = False
3 SLEEP_SECOND_DOC_GET = 2 3 SLEEP_SECOND_DOC_GET = 2
4 SLEEP_SECOND_IMG_PUT = 1 4 SLEEP_SECOND_IMG_PUT = 2
5 SLEEP_SECOND_IMG_GET = 0.5 5 SLEEP_SECOND_IMG_GET = 0.5
6 SLEEP_SECOND_TASK_GET = 1 6 SLEEP_SECOND_TASK_GET = 2
7 IMG_QUEUE_SIZE = 500 7 IMG_QUEUE_SIZE = 500
8 8
9 EDMS_DOWNLOAD_URL = https://edms-test.bmw.com/FH/FileHold/DocumentRepository/DownloadHandler.ashx 9 EDMS_DOWNLOAD_URL = https://edms-test.bmw.com/FH/FileHold/DocumentRepository/DownloadHandler.ashx
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!