| 129 | cluster.cluster_settings.default_serializer) |
| 130 | |
| 131 | async def run(self, |
| 132 | txn_logic, # type: Callable[[AttemptContextLogic], Coroutine[Any, Any, None]] |
| 133 | transaction_options=None, # type: Optional[TransactionOptions] |
| 134 | **kwargs) -> TransactionResult: |
| 135 | opts = None |
| 136 | if transaction_options: |
| 137 | opts = transaction_options._base |
| 138 | if 'per_txn_config' in kwargs: |
| 139 | Supportability.method_param_deprecated('per_txn_config', 'transaction_options') |
| 140 | opts = kwargs.pop('per_txn_config', None) |
| 141 | |
| 142 | txn_result = await super().run_async(txn_logic, AttemptContext(self._txns, self._loop, self._transcoder, opts)) |
| 143 | return TransactionResult(**txn_result) |
| 144 | |
| 145 | # TODO: make async? |
| 146 | def close(self): |