equal
deleted
inserted
replaced
973 def hook(): |
973 def hook(): |
974 reporef().hook('txnclose', throw=False, txnname=desc, |
974 reporef().hook('txnclose', throw=False, txnname=desc, |
975 **tr2.hookargs) |
975 **tr2.hookargs) |
976 reporef()._afterlock(hook) |
976 reporef()._afterlock(hook) |
977 tr.addfinalize('txnclose-hook', txnclosehook) |
977 tr.addfinalize('txnclose-hook', txnclosehook) |
|
978 def txnaborthook(tr2): |
|
979 """To be run if transaction is aborted |
|
980 """ |
|
981 reporef().hook('txnabort', throw=False, txnname=desc, |
|
982 **tr2.hookargs) |
|
983 tr.addabort('txnabort-hook', txnaborthook) |
978 self._transref = weakref.ref(tr) |
984 self._transref = weakref.ref(tr) |
979 return tr |
985 return tr |
980 |
986 |
981 def _journalfiles(self): |
987 def _journalfiles(self): |
982 return ((self.svfs, 'journal'), |
988 return ((self.svfs, 'journal'), |