commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/16d9f6306be0/ Changeset: 16d9f6306be0 User: jmchilton Date: 2014-12-17 16:01:16+00:00 Summary: Fixed for botched automated merge 78597d2. Makes me worry about all the automated merges I have done lately. Also - I hate you mercurial. Affected #: 1 file diff -r 78597d2278e28ac962b80179d15eacd5849a4c79 -r 16d9f6306be079016cbba3ebe9eac9c5a3937282 lib/galaxy/tools/test.py --- a/lib/galaxy/tools/test.py +++ b/lib/galaxy/tools/test.py @@ -183,7 +183,8 @@ if isinstance( value, galaxy.tools.parameters.basic.DataToolParameter ): if not isinstance(param_value, list): param_value = [ param_value ] - processed_value = [ self.__add_uploaded_dataset( context.for_state(), v, param_extra, value ) for v in param_value ] + map( lambda v: self.__add_uploaded_dataset( context.for_state(), v, param_extra, value ), param_value ) + processed_value = param_value elif isinstance( value, galaxy.tools.parameters.basic.DataCollectionToolParameter ): assert 'collection' in param_extra collection_def = param_extra[ 'collection' ] https://bitbucket.org/galaxy/galaxy-central/commits/867635153252/ Changeset: 867635153252 User: jmchilton Date: 2014-12-17 16:02:45+00:00 Summary: Merge. Affected #: 1 file diff -r 16d9f6306be079016cbba3ebe9eac9c5a3937282 -r 867635153252d0830dac64ba72ede3cb637e2abf cron/cleanup_datasets.py --- a/cron/cleanup_datasets.py +++ b/cron/cleanup_datasets.py @@ -1,63 +1,8 @@ #!/usr/bin/env python -#This script removes deleted dataset files. -#Takes 3 arguments: -# 1: database directory to clean -# 2: postgres database name -# 3 (optional): number of days to allow as a buffer, defaults to 2 -#python cleanup_datasets.py /home/universe/server-home/wsgi-postgres/database/files/ galaxy_test 2 +import sys -import sys, os, tempfile, time -try: - database_dir = sys.argv[1] - database_name = sys.argv[2] - num_days = 2 - try: - num_days = int(sys.argv[3]) - except: - print "Using Default of 2 days buffer on delete" -except: - print "Usage: python %s path_to_files:/home/universe/server-home/wsgi-postgres/database/files/ database_name:galaxy_test [num_days_buffer:2]" % sys.argv[0] - sys.exit(0) -id_file = tempfile.NamedTemporaryFile('w') -id_filename = id_file.name -id_file.close() -ids = [] +print ("This script has been deprecated, replaced by the set of scripts in <galaxy_distribution>/scripts/cleanup_datsets/." + "See https://wiki.galaxyproject.org/Admin/Config/Performance/Purge%20Histories%20... for more information.") -command = "psql -d %s -c \"select id from dataset;\" -o %s" % (database_name, id_filename) -print "Getting IDs:", command -id_file = os.popen(command) -id_file.close() -for line in open(id_filename,'r'): - try: - ids.append(int(line.strip())) - except: - print line.strip(),"is not a valid id, skipping." -os.unlink(id_filename) -if len(ids) < 1: - print "Less than 1 IDs have been found! Deleting proccess has been canceled." - sys.exit(0) -print "-----%i IDs Retrieved -----" % len(ids) -print "----- Checking database directory for deleted ids: %s -----" % database_dir -file_size = 0 -num_delete = 0 -for result in os.walk(database_dir): - this_base_dir,sub_dirs,files = result - for file in files: - if file.startswith("dataset_") and file.endswith(".dat"): - id = int(file.replace("dataset_","").replace(".dat","")) - file_name = os.path.join(this_base_dir,file) - if id not in ids: - file_time = os.path.getctime(file_name) - if time.time() > file_time + (num_days*60*60*24): #num_days (default=2) days buffer room - num_delete += 1 - size = os.path.getsize(file_name) - file_size += size - os.unlink(file_name) -print file_size, "bytes" -print float(file_size) / 1024, "kilobytes" -print float(file_size) / 1024 / 1024, "Megabytes" -print float(file_size) / 1024 / 1024 / 1024, "Gigabytes" -print "%i files deleted" % num_delete - -sys.exit(0) \ No newline at end of file +sys.exit(1) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org