Garbage collection image+storage callback support

Add support to GC to invoke a callback with the image+storages removed. Only images whose storage was also removed will be sent to the callback. This will be used by security scanning for its own GC in the followup change.
This commit is contained in:
Joseph Schorr 2016-12-22 14:27:42 -05:00
parent 35244d839d
commit 5225642850
4 changed files with 107 additions and 39 deletions

View file

@ -107,6 +107,10 @@ class Config(object):
def __init__(self):
self.app_config = None
self.store = None
self.image_cleanup_callbacks = []
def register_image_cleanup_callback(self, callback):
self.image_cleanup_callbacks.append(callback)
config = Config()