Jeff Hale
11/19/2024, 8:17 PMon_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