Remove dependent signatures before removing image storages
This commit is contained in:
parent
7d0be20842
commit
1b392dcb9a
1 changed files with 6 additions and 0 deletions
|
@ -75,6 +75,12 @@ def garbage_collect_storage(storage_id_whitelist):
|
|||
.execute())
|
||||
logger.debug('Removed %s torrent info records', torrents_removed)
|
||||
|
||||
signatures_removed = (ImageStorageSignature
|
||||
.delete()
|
||||
.where(ImageStorageSignature.storage << orphaned_storages)
|
||||
.execute())
|
||||
logger.debug('Removed %s image storage signatures', signatures_removed)
|
||||
|
||||
storages_removed = (ImageStorage
|
||||
.delete()
|
||||
.where(ImageStorage.id << orphaned_storages)
|
||||
|
|
Reference in a new issue