Ecto Multi.run

You use Multi.run for something not DB oriented but where you still want the DB to rollback if it fails, so yes, this is the use-case it is for. :slight_smile:

Just remember that an entire Multi pipeline is in a transaction, so the rows it accessed in the database are locked until it’s complete, so make sure it doesn’t take too long to run.