Revert "fix postgres serializable transaction"
This reverts commit 0a70ea8a95
.
This commit is contained in:
parent
1136e2436b
commit
8717ad477e
@ -13,7 +13,7 @@ class DBModel:
|
|||||||
def __init__(self, connection, cursor):
|
def __init__(self, connection, cursor):
|
||||||
self.connection = connection
|
self.connection = connection
|
||||||
self.cursor = cursor
|
self.cursor = cursor
|
||||||
#self.cursor.execute("SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;")
|
self.cursor.execute("SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;")
|
||||||
|
|
||||||
|
|
||||||
# ------ LOGIN ---------
|
# ------ LOGIN ---------
|
||||||
@ -362,7 +362,7 @@ class DBModel:
|
|||||||
# have to make a new cursor to set isolation level
|
# have to make a new cursor to set isolation level
|
||||||
# cursor = self.connection.cursor()
|
# cursor = self.connection.cursor()
|
||||||
self.cursor.execute("""
|
self.cursor.execute("""
|
||||||
BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
BEGIN TRANSACTION;
|
||||||
UPDATE host_operation SET assignment_status = 'assigned'
|
UPDATE host_operation SET assignment_status = 'assigned'
|
||||||
WHERE host = %s AND operation = %s AND operation != (
|
WHERE host = %s AND operation = %s AND operation != (
|
||||||
SELECT COALESCE(
|
SELECT COALESCE(
|
||||||
|
Loading…
Reference in New Issue
Block a user