mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-29 17:42:12 +08:00
Add extra_dir options for S3/Swift ObjectStore.
This commit is contained in:
@@ -23,9 +23,11 @@
|
||||
|
||||
<!-- Sample S3 Object Store
|
||||
<object_store type="s3">
|
||||
<auth access_key="...." secret_key="....." />
|
||||
<bucket name="unique_bucket_name_all_lowercase" use_reduced_redundancy="False" />
|
||||
<cache path="database/files/" size="1000" />
|
||||
<auth access_key="...." secret_key="....." />
|
||||
<bucket name="unique_bucket_name_all_lowercase" use_reduced_redundancy="False" />
|
||||
<cache path="database/object_store_cache" size="1000" />
|
||||
<extra_dir type="job_work" path="database/job_working_directory_s3"/>
|
||||
<extra_dir type="temp" path="database/tmp_s3"/>
|
||||
</object_store>
|
||||
-->
|
||||
|
||||
@@ -34,7 +36,9 @@
|
||||
<auth access_key="...." secret_key="....." />
|
||||
<bucket name="unique_bucket_name" use_reduced_redundancy="False" max_chunk_size="250"/>
|
||||
<connection host="" port="" is_secure="" conn_path="" multipart="True"/>
|
||||
<cache path="database/files/" size="1000" />
|
||||
<cache path="database/object_store_cache" size="1000" />
|
||||
<extra_dir type="job_work" path="database/job_working_directory_swift"/>
|
||||
<extra_dir type="temp" path="database/tmp_swift"/>
|
||||
</object_store>
|
||||
-->
|
||||
|
||||
|
||||
@@ -92,6 +92,14 @@ class S3ObjectStore(ObjectStore):
|
||||
self.conn_path = cn_xml.get('conn_path', '/')
|
||||
c_xml = config_xml.findall('cache')[0]
|
||||
self.cache_size = float(c_xml.get('size', -1))
|
||||
self.staging_path = c_xml.get('path', self.config.object_store_cache_path)
|
||||
|
||||
for d_xml in config_xml.findall('extra_dir'):
|
||||
self.extra_dirs[d_xml.get('type')] = d_xml.get('path')
|
||||
|
||||
log.debug("Object cache dir: %s", self.staging_path)
|
||||
log.debug(" job work dir: %s", self.extra_dirs['job_work'])
|
||||
|
||||
# for multipart upload
|
||||
self.s3server = {'access_key': self.access_key,
|
||||
'secret_key': self.secret_key,
|
||||
|
||||
Reference in New Issue
Block a user