Prefer partial since it is the what the [docs suggests](https://docs.djangoproject.com/en/4.2/topics/db/transactions/#performing-actions-after-commit). Also because partial is evaluated immediately while lambda is evaluated at runtime (which may be causing some issues): ``` >>> from functools import partial >>> def foo(a, b, c): ... print(a, b, c) ... >>> x = 10 >>> bar_partial = partial(foo, 1, 2, x) >>> bar_lambda = lambda: foo(1, 2, x) >>> x = 20 >>> bar_partial() 1 2 10 >>> bar_lambda() 1 2 20 ``` |
||
|---|---|---|
| .. | ||
| escalation_snapshot | ||
| grafana_alerting_sync_manager | ||
| incident_appearance | ||
| incident_log_builder | ||
| migrations | ||
| models | ||
| tasks | ||
| tests | ||
| __init__.py | ||
| constants.py | ||
| integration_options_mixin.py | ||
| paging.py | ||
| representative.py | ||
| signals.py | ||
| utils.py | ||