e80661aa by 周伟奇

small int limit

1 parent 4fa33a02
......@@ -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.end_time - doc.start_time).seconds
doc.duration = min((doc.end_time - doc.start_time).seconds, 32760)
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.end_time - doc.start_time).seconds
doc.duration = min((doc.end_time - doc.start_time).seconds, 32760)
for field, count in count_list:
if hasattr(doc, field):
setattr(doc, field, count)
......
[settings]
DEBUG = False
SLEEP_SECOND_DOC_GET = 2
SLEEP_SECOND_IMG_PUT = 1
SLEEP_SECOND_IMG_PUT = 2
SLEEP_SECOND_IMG_GET = 0.5
SLEEP_SECOND_TASK_GET = 1
SLEEP_SECOND_TASK_GET = 2
IMG_QUEUE_SIZE = 500
EDMS_DOWNLOAD_URL = https://edms-test.bmw.com/FH/FileHold/DocumentRepository/DownloadHandler.ashx
......
[settings]
DEBUG = True
SLEEP_SECOND_DOC_GET = 10
SLEEP_SECOND_IMG_PUT = 1
SLEEP_SECOND_IMG_PUT = 2
SLEEP_SECOND_IMG_GET = 0.5
SLEEP_SECOND_TASK_GET = 2
IMG_QUEUE_SIZE = 500
......
[settings]
DEBUG = False
SLEEP_SECOND_DOC_GET = 2
SLEEP_SECOND_IMG_PUT = 1
SLEEP_SECOND_IMG_PUT = 2
SLEEP_SECOND_IMG_GET = 0.5
SLEEP_SECOND_TASK_GET = 1
SLEEP_SECOND_TASK_GET = 2
IMG_QUEUE_SIZE = 500
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!