Revert "fix postgres serializable transaction"

This reverts commit 0a70ea8a95.
This commit is contained in:
forest 2021-03-21 12:28:19 -05:00
parent 1136e2436b
commit 8717ad477e

View File

@ -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(