The journal and attempt metadata of a running transaction.
attempt counts runs of the outermost body from 1; retry_reason is
None on the first. start and now are wall-clock milliseconds
since the epoch read from the Clock, as in schedule metadata:
start when the transaction began, now when this attempt began.
Attributes#
| Attribute | Type | Description |
|---|---|---|
journal | Mapping[TxRef[Any], JournalEntry] | |
attempt | int | |
retry_reason | TransactionRetryReason | None | |
start | float | |
now | float | |
elapsed | float | Milliseconds since the first attempt began: |
elapsed_since_previous | float | Milliseconds since the previous attempt began, as Effect's. |
Functions#
__init__#
__init__(start_ns) -> None| Parameter | Type | Description |
|---|---|---|
start_ns | int |
def __init__(self, start_ns: int) -> None:
self._journal: dict[TxRef[Any], JournalEntry] = {}
self._retry = False
self._completed = False
self._attempt = 1
self._retry_reason: TransactionRetryReason | None = None
self._start_ns = start_ns
self._now_ns = start_ns
self._previous_ns = start_ns