This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/master by this push:
new d28d84c remove sql-only twophase_transaction helper
d28d84c is described below
commit d28d84c079358adbcc646c8eb3def938b0da0910
Author: Dillon Walls <[email protected]>
AuthorDate: Mon Mar 21 14:33:28 2022 +0000
remove sql-only twophase_transaction helper
---
Allura/allura/lib/helpers.py | 25 -------------------------
1 file changed, 25 deletions(-)
diff --git a/Allura/allura/lib/helpers.py b/Allura/allura/lib/helpers.py
index 0e280b1..f0d0025 100644
--- a/Allura/allura/lib/helpers.py
+++ b/Allura/allura/lib/helpers.py
@@ -670,31 +670,6 @@ def config_with_prefix(d, prefix):
if k.startswith(prefix)}
-@contextmanager
-def twophase_transaction(*engines):
- connections = [
- e.contextual_connect()
- for e in engines]
- txns = []
- to_rollback = []
- try:
- for conn in connections:
- txn = conn.begin_twophase()
- txns.append(txn)
- to_rollback.append(txn)
- yield
- to_rollback = []
- for txn in txns:
- txn.prepare()
- to_rollback.append(txn)
- for txn in txns:
- txn.commit()
- except Exception:
- for txn in to_rollback:
- txn.rollback()
- raise
-
-
def paging_sanitizer(limit, page, total_count=sys.maxsize,
zero_based_pages=True):
"""Return limit, page - both converted to int and constrained to
valid ranges based on total_count.