View Source mix antikythera_core.delete_obsolete_assets (antikythera v0.5.1)
Deletes obsolete asset files in asset storage.
To judge whether each asset file should be kept or deleted we use "asset list file"s.
Each asset list file is created during deployment of a gear version (see Mix.Tasks.AntikytheraCore.UploadNewAssetVersions
).
Based on the asset retention policy described in the moduledoc of Antikythera.Asset
,
it can be seen that, within all existing asset list files, only the following ones are relevant:
- asset list files created within the latest 90 days
- the latest asset list file among ones created up to 90 days before
Assets included in any of the relevant asset list files should be kept. Assets not included in all of the relevant asset list files are "obsolete"; they should be deleted.
Summary
Functions
Callback implementation for Mix.Task.run/1
.
Functions
Callback implementation for Mix.Task.run/1
.