Delete no-longer required delivery artifacts #430
Labels
API
https://dlcs-book.readthedocs.io/en/latest/
delivery-channels
engine
jira
marks issue for crossposting to JIRA
sustainability
Projects
Ticket #393 introduced the concept of delivery-channels.
Different combinations of deliveryChannel and mediaType can result in different resources being created and uploaded to S3. We need to catch if a change in deliveryChannel means that some of these resources are now no-longer required and delete them.
This would be difficult to do in the Engine as it gets posted a payload containing the current state of the Asset, at which time the database record has been written to show it is being processed.
A notification raised by
IAssetNotificationSender.SendAssetModifiedNotification(ChangeType changeType, Asset? before, Asset? after)
would be a sensible place to implement this logic. It's already hooked up for single PUT operations but bulk operations would need extended as they only send details of the AssetId, rather than fully hydrated Asset. This was done to avoid additional queries to database (e.g. 100 updates would require 100 db calls) but it sounds like this is the best place to handle this requirement.The text was updated successfully, but these errors were encountered: