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