mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Multipart upload to OpenStack Swift does not work with boto so don't use it
This commit is contained in:
@@ -631,7 +631,7 @@ class S3ObjectStore(ObjectStore):
|
||||
# print "Pushing cache file '%s' of size %s bytes to key '%s'" % (source_file, os.path.getsize(source_file), rel_path)
|
||||
# print "+ Push started at '%s'" % start_time
|
||||
mb_size = os.path.getsize(source_file) / 1e6
|
||||
if mb_size < 60:
|
||||
if mb_size < 60 or self.config.object_store == 'swift':
|
||||
self.transfer_progress = 0 # Reset transfer progress counter
|
||||
key.set_contents_from_filename(source_file, reduced_redundancy=self.use_rr,
|
||||
cb=self._transfer_cb, num_cb=10)
|
||||
@@ -649,12 +649,17 @@ class S3ObjectStore(ObjectStore):
|
||||
return False
|
||||
|
||||
def file_ready(self, obj, **kwargs):
|
||||
""" A helper method that checks if a file corresponding to a dataset
|
||||
is ready and available to be used. Return True if so, False otherwise."""
|
||||
"""
|
||||
A helper method that checks if a file corresponding to a dataset is
|
||||
ready and available to be used. Return ``True`` if so, ``False`` otherwise.
|
||||
"""
|
||||
rel_path = self._construct_path(obj, **kwargs)
|
||||
# Make sure the size in cache is available in its entirety
|
||||
if self._in_cache(rel_path) and os.path.getsize(self._get_cache_path(rel_path)) == self._get_size_in_s3(rel_path):
|
||||
return True
|
||||
if self._in_cache(rel_path):
|
||||
if os.path.getsize(self._get_cache_path(rel_path)) == self._get_size_in_s3(rel_path):
|
||||
return True
|
||||
log.debug("Waiting for dataset {0} to transfer from OS: {1}/{2}".format(rel_path,
|
||||
os.path.getsize(self._get_cache_path(rel_path)), self._get_size_in_s3(rel_path)))
|
||||
return False
|
||||
|
||||
def exists(self, obj, **kwargs):
|
||||
|
||||
@@ -166,7 +166,7 @@ $(function() {
|
||||
// $("<div/>").text("Data is loading from S3... please be patient").appendTo(link.parent());
|
||||
$( '#historyItem-' + history_id).removeClass( "historyItem-ok" );
|
||||
$( '#historyItem-' + history_id).addClass( "historyItem-running" );
|
||||
setTimeout(function(){check_transfer_status(link, history_id)}, 1000);
|
||||
setTimeout(function(){check_transfer_status(link, history_id)}, 4000);
|
||||
} else {
|
||||
$( '#historyItem-' + history_id).removeClass( "historyItem-running" );
|
||||
$( '#historyItem-' + history_id).addClass( "historyItem-ok" );
|
||||
|
||||
Reference in New Issue
Block a user