mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
merging from central
This commit is contained in:
@@ -203,6 +203,12 @@ def purge_histories( h, d, m, cutoff_time, remove_from_disk ):
|
||||
metadata_file.purged = True
|
||||
metadata_file.flush()
|
||||
print "%s" % metadata_file.file_name()
|
||||
for lda in dataset.library_associations:
|
||||
for metadata_file in m.filter( m.table.c.lda_id==lda.id ).all():
|
||||
metadata_file.deleted = True
|
||||
metadata_file.purged = True
|
||||
metadata_file.flush()
|
||||
print "%s" % metadata_file.file_name()
|
||||
dataset_count += 1
|
||||
try:
|
||||
disk_space += file_size
|
||||
@@ -269,6 +275,12 @@ def purge_datasets( d, m, cutoff_time, remove_from_disk ):
|
||||
metadata_file.purged = True
|
||||
metadata_file.flush()
|
||||
print "%s" % metadata_file.file_name()
|
||||
for lda in dataset.library_associations:
|
||||
for metadata_file in m.filter( m.table.c.lda_id==lda.id ).all():
|
||||
metadata_file.deleted = True
|
||||
metadata_file.purged = True
|
||||
metadata_file.flush()
|
||||
print "%s" % metadata_file.file_name()
|
||||
dataset_count += 1
|
||||
try:
|
||||
disk_space += file_size
|
||||
@@ -303,6 +315,12 @@ def purge_dataset( dataset, d, m ):
|
||||
if not shared_data.deleted:
|
||||
purgable = False
|
||||
break
|
||||
if purgable:
|
||||
# This check handles the library_folder_dataset_association approach to sharing.
|
||||
for shared_data in dataset.library_associations:
|
||||
if not shared_data.deleted:
|
||||
purgable = False
|
||||
break
|
||||
if purgable:
|
||||
dataset.purged = True
|
||||
dataset.file_size = 0
|
||||
@@ -319,6 +337,12 @@ def purge_dataset( dataset, d, m ):
|
||||
metadata_file.purged = True
|
||||
metadata_file.flush()
|
||||
print "%s" % metadata_file.file_name()
|
||||
for lda in dataset.library_associations:
|
||||
for metadata_file in m.filter( m.table.c.lda_id==lda.id ).all():
|
||||
metadata_file.deleted = True
|
||||
metadata_file.purged = True
|
||||
metadata_file.flush()
|
||||
print "%s" % metadata_file.file_name()
|
||||
try:
|
||||
# Remove associated extra files from disk if they exist
|
||||
os.unlink( dataset.extra_files_path )
|
||||
|
||||
Reference in New Issue
Block a user