Glossary: Django Beyond the Basics
Transaction, on_commit
Also written: transaction, commit, on_commit, transaction.on_commit, transaction.atomic
A transaction is a set of changes saved all together or not at all; `transaction.atomic()` runs a block as one. `transaction.on_commit(func)` calls `func` only after that transaction is saved, so a worker never looks for an order that isn't saved yet.