From 8717ad477e399818c400ed055f5d23d4d6ab6d66 Mon Sep 17 00:00:00 2001 From: forest Date: Sun, 21 Mar 2021 12:28:19 -0500 Subject: [PATCH] Revert "fix postgres serializable transaction" This reverts commit 0a70ea8a9514b367796ec245efbd9c8b7468907a. --- capsulflask/db_model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/capsulflask/db_model.py b/capsulflask/db_model.py index ac3eaee..46101da 100644 --- a/capsulflask/db_model.py +++ b/capsulflask/db_model.py @@ -13,7 +13,7 @@ class DBModel: def __init__(self, connection, cursor): self.connection = connection self.cursor = cursor - #self.cursor.execute("SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;") + self.cursor.execute("SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;") # ------ LOGIN --------- @@ -362,7 +362,7 @@ class DBModel: # have to make a new cursor to set isolation level # cursor = self.connection.cursor() self.cursor.execute(""" - BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; + BEGIN TRANSACTION; UPDATE host_operation SET assignment_status = 'assigned' WHERE host = %s AND operation = %s AND operation != ( SELECT COALESCE(