PhoenixKit.Modules.Storage.Workers.PurgeLibraryJob (phoenix_kit v2.45.0)

Copy Markdown View Source

Oban worker that purges one trashed storage library: its files (bytes included, through the normal delete path), its folders, then the library (PhoenixKit.Modules.Storage.Libraries.purge_library/1).

Queued when a user's libraries are trashed because the user is deleted, and by the daily trash prune for libraries trashed longer ago than the retention period. A library that is gone, or no longer trashed, is left alone. A library on a user's own bucket whose objects could not all be deleted is retried ({:error, :objects_remain}).