View Source Mobilizon.Service.CleanOrphanMedia (Mobilizon v5.0.0-beta.1)

Service to clean orphan media

Summary

Functions

Clean orphan media

Functions

@spec clean(Keyword.t()) :: {:ok, [Mobilizon.Medias.Media.t()]}

Clean orphan media

Remove media that is not attached to an entity, such as media uploads that were never used in entities.

Options:

  • grace_period how old in hours can the media be before it's taken into account for deletion
  • dry_run just return the media that would have been deleted, don't actually delete it