Also, you do have the ability to hook into a few s...
# pacc-nov-19-20-2024
j
Also, you do have the ability to hook into a few states with transactions: > Tasks also have
on_commit
lifecycle hooks > In addition to the
on_rollback
hook, a task can also register
on_commit
hooks that execute whenever its transaction is committed. A task run persists its result only at transaction commit time, which could be significantly after the task’s completion time if it is within a long running transaction. > The signature for an
on_commit
hook is the same as that of an
on_rollback
hook: From https://docs.prefect.io/v3/develop/transactions#transaction-lifecycle