antikythera v0.2.0 mix antikythera_core.delete_obsolete_assets View Source
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.
Link to this section Summary
Link to this section Functions
A task needs to implement run
which receives
a list of command line args.
Callback implementation for Mix.Task.run/1
.