File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
1
django-s3-storage changelog
2
2
===========================
3
3
4
+ 0.13.11
5
+ -------
6
+
7
+ - Added ``AWS_S3_CONNECT_TIMEOUT `` setting (@roriz).
8
+
4
9
0.13.10
5
10
-------
6
11
Original file line number Diff line number Diff line change @@ -120,6 +120,12 @@ Use the following settings to configure the S3 file storage. You must provide at
120
120
# is used it must be disabled
121
121
AWS_S3_USE_THREADS = True
122
122
123
+ # Max pool of connections for massive S3 interactions
124
+ AWS_S3_MAX_POOL_CONNECTIONS = 10
125
+
126
+ # Time to raise timeout when submitting a new file
127
+ AWS_S3_CONNECT_TIMEOUT = 60
128
+
123
129
**Important: ** Several of these settings (noted above) will not affect existing files. To sync the new settings to
124
130
existing files, run ``./manage.py s3_sync_meta django.core.files.storage.default_storage ``.
125
131
Original file line number Diff line number Diff line change @@ -116,7 +116,8 @@ def __init__(self, storage):
116
116
self .s3_connection = self .session .client ("s3" , config = Config (
117
117
s3 = {"addressing_style" : storage .settings .AWS_S3_ADDRESSING_STYLE },
118
118
signature_version = storage .settings .AWS_S3_SIGNATURE_VERSION ,
119
- max_pool_connections = storage .settings .AWS_S3_MAX_POOL_CONNECTIONS
119
+ max_pool_connections = storage .settings .AWS_S3_MAX_POOL_CONNECTIONS ,
120
+ connect_timeout = storage .settings .AWS_S3_CONNECT_TIMEOUT
120
121
), ** connection_kwargs )
121
122
122
123
@@ -152,7 +153,8 @@ class S3Storage(Storage):
152
153
"AWS_S3_SIGNATURE_VERSION" : "s3v4" ,
153
154
"AWS_S3_FILE_OVERWRITE" : False ,
154
155
"AWS_S3_USE_THREADS" : True ,
155
- "AWS_S3_MAX_POOL_CONNECTIONS" : 10
156
+ "AWS_S3_MAX_POOL_CONNECTIONS" : 10 ,
157
+ "AWS_S3_CONNECT_TIMEOUT" : 60 # 60 seconds
156
158
}
157
159
158
160
s3_settings_suffix = ""
You can’t perform that action at this time.
0 commit comments