Karta.Messaging.Purge (Karta v1.0.0)

Removes media blobs before the rows that name them, so that a failure leaves a row to try again and never a blob nobody can find (Karta.Storage is the store). Used by retention and when a connector is deleted.

Summary

Functions

Deletes the blobs of the media rows ids, then the rows. Returns how many rows went.

Removes every media blob and row of a connector: those its agent uploaded and those its messages hold.

Functions

media(ids, opts \\ [])

@spec media([Ecto.UUID.t()], keyword()) :: non_neg_integer()

Deletes the blobs of the media rows ids, then the rows. Returns how many rows went.

media_of_connector(connector_id)

@spec media_of_connector(Ecto.UUID.t()) :: non_neg_integer()

Removes every media blob and row of a connector: those its agent uploaded and those its messages hold.