Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
feld (feld@bikeshed.party)'s status on Friday, 23-Aug-2024 09:30:14 JSTfeld @mint Actually this could be easier than you think.
https://git.pleroma.social/pleroma/pleroma/-/blob/develop/lib/pleroma/web/federator.ex?ref_type=heads#L105
You just wrap this entire with statement in Pleroma.Repo.transaction() and if it exits with an error none of the database changes are committed.
https://hexdocs.pm/ecto/Ecto.Repo.html#c:transaction/2