commit/galaxy-central: greg: Add patch from Assaf Gordon to fix the cleanup_dataset.py script, correcting the behavior of setting the info_only flag to True when running delete_datasets.sh and purge_datasets.sh.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/a5e0a5d3c0a1/ changeset: a5e0a5d3c0a1 user: greg date: 2011-07-06 15:52:28 summary: Add patch from Assaf Gordon to fix the cleanup_dataset.py script, correcting the behavior of setting the info_only flag to True when running delete_datasets.sh and purge_datasets.sh. affected #: 1 file (265 bytes) --- a/scripts/cleanup_datasets/cleanup_datasets.py Wed Jul 06 09:45:41 2011 +1000 +++ b/scripts/cleanup_datasets/cleanup_datasets.py Wed Jul 06 09:52:28 2011 -0400 @@ -411,10 +411,13 @@ app.sa_session.add( metadata_file ) app.sa_session.flush() print "%s" % metadata_file.file_name - print "Deleting dataset id", dataset.id - dataset.deleted = True - app.sa_session.add( dataset ) - app.sa_session.flush() + if not info_only: + print "Deleting dataset id", dataset.id + dataset.deleted = True + app.sa_session.add( dataset ) + app.sa_session.flush() + else: + print "Dataset %i will be deleted (without 'info_only' mode)" % ( dataset.id ) def _purge_dataset( app, dataset, remove_from_disk, info_only = False ): if dataset.deleted: @@ -433,6 +436,8 @@ dataset.purged = True app.sa_session.add( dataset ) app.sa_session.flush() + else: + print "Dataset %i will be purged (without 'info_only' mode)" % (dataset.id) else: print "This dataset (%i) is not purgable, the file (%s) will not be removed.\n" % ( dataset.id, dataset.file_name ) except OSError, exc: 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)
-
Bitbucket