Show More
@@ -307,6 +307,9 b' archive_cache.objectstore.key = key' | |||
|
307 | 307 | ; secret for s3 auth |
|
308 | 308 | archive_cache.objectstore.secret = secret |
|
309 | 309 | |
|
310 | ;region for s3 storage | |
|
311 | archive_cache.objectstore.region = eu-central-1 | |
|
312 | ||
|
310 | 313 | ; number of sharded buckets to create to distribute archives across |
|
311 | 314 | ; default is 8 shards |
|
312 | 315 | archive_cache.objectstore.bucket_shards = 8 |
@@ -275,6 +275,9 b' archive_cache.objectstore.key = key' | |||
|
275 | 275 | ; secret for s3 auth |
|
276 | 276 | archive_cache.objectstore.secret = secret |
|
277 | 277 | |
|
278 | ;region for s3 storage | |
|
279 | archive_cache.objectstore.region = eu-central-1 | |
|
280 | ||
|
278 | 281 | ; number of sharded buckets to create to distribute archives across |
|
279 | 282 | ; default is 8 shards |
|
280 | 283 | archive_cache.objectstore.bucket_shards = 8 |
@@ -204,6 +204,7 b' def sanitize_settings_and_apply_defaults' | |||
|
204 | 204 | settings_maker.make_setting('archive_cache.objectstore.url', jn(default_cache_dir, 'archive_cache'), default_when_empty=True,) |
|
205 | 205 | settings_maker.make_setting('archive_cache.objectstore.key', '') |
|
206 | 206 | settings_maker.make_setting('archive_cache.objectstore.secret', '') |
|
207 | settings_maker.make_setting('archive_cache.objectstore.region', 'eu-central-1') | |
|
207 | 208 | settings_maker.make_setting('archive_cache.objectstore.bucket', 'rhodecode-archive-cache', default_when_empty=True,) |
|
208 | 209 | settings_maker.make_setting('archive_cache.objectstore.bucket_shards', 8, parser='int') |
|
209 | 210 |
@@ -142,10 +142,11 b' class ObjectStoreCache(BaseCache):' | |||
|
142 | 142 | endpoint_url = settings.pop('archive_cache.objectstore.url') |
|
143 | 143 | key = settings.pop('archive_cache.objectstore.key') |
|
144 | 144 | secret = settings.pop('archive_cache.objectstore.secret') |
|
145 | region = settings.pop('archive_cache.objectstore.region') | |
|
145 | 146 | |
|
146 | 147 | log.debug('Initializing %s archival cache instance', self) |
|
147 | 148 | |
|
148 | fs = fsspec.filesystem('s3', anon=False, endpoint_url=endpoint_url, key=key, secret=secret) | |
|
149 | fs = fsspec.filesystem('s3', anon=False, endpoint_url=endpoint_url, key=key, secret=secret, region=region) | |
|
149 | 150 | |
|
150 | 151 | # init main bucket |
|
151 | 152 | if not fs.exists(self._bucket): |
@@ -275,6 +275,9 b' archive_cache.objectstore.key = key' | |||
|
275 | 275 | ; secret for s3 auth |
|
276 | 276 | archive_cache.objectstore.secret = secret |
|
277 | 277 | |
|
278 | ;region for s3 storage | |
|
279 | archive_cache.objectstore.region = eu-central-1 | |
|
280 | ||
|
278 | 281 | ; number of sharded buckets to create to distribute archives across |
|
279 | 282 | ; default is 8 shards |
|
280 | 283 | archive_cache.objectstore.bucket_shards = 8 |
General Comments 0
You need to be logged in to leave comments.
Login now