mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Merge pull request #310 from nsoranzo/release_15.05
[15.05] Mark also HDAs as purged when purging datasets via cleanup script.
This commit is contained in:
@@ -460,8 +460,10 @@ def _purge_dataset( app, dataset, remove_from_disk, info_only = False ):
|
||||
shutil.rmtree( dataset.extra_files_path ) #we need to delete the directory and its contents; os.unlink would always fail on a directory
|
||||
usage_users = []
|
||||
for hda in dataset.history_associations:
|
||||
if not hda.purged and hda.history.user is not None and hda.history.user not in usage_users:
|
||||
usage_users.append( hda.history.user )
|
||||
if not hda.purged:
|
||||
hda.purged = True
|
||||
if hda.history.user is not None and hda.history.user not in usage_users:
|
||||
usage_users.append( hda.history.user )
|
||||
for user in usage_users:
|
||||
user.total_disk_usage -= dataset.total_size
|
||||
app.sa_session.add( user )
|
||||
|
||||
Reference in New Issue
Block a user