MCPcopy
hub / github.com/django/django / on_commit

Function on_commit

django/db/transaction.py:140–145  ·  view source on GitHub ↗

Register `func` to be called when the current transaction is committed. If the current transaction is rolled back, `func` will not be called.

(func, using=None, robust=False)

Source from the content-addressed store, hash-verified

138
139
140def on_commit(func, using=None, robust=False):
141 """
142 Register `func` to be called when the current transaction is committed.
143 If the current transaction is rolled back, `func` will not be called.
144 """
145 get_connection(using).on_commit(func, robust)
146
147
148#################################

Callers 2

on_commitMethod · 0.85
test_hook_in_hookMethod · 0.85

Calls 2

get_connectionFunction · 0.70
on_commitMethod · 0.45

Tested by 2

on_commitMethod · 0.68
test_hook_in_hookMethod · 0.68