aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/helpers/database-utils.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/helpers/database-utils.ts b/server/helpers/database-utils.ts
index 240b18033..b5dc70c17 100644
--- a/server/helpers/database-utils.ts
+++ b/server/helpers/database-utils.ts
@@ -108,7 +108,9 @@ function setAsUpdated (table: string, id: number, transaction?: Transaction) {
108// --------------------------------------------------------------------------- 108// ---------------------------------------------------------------------------
109 109
110function runInReadCommittedTransaction <T> (fn: (t: Transaction) => Promise<T>) { 110function runInReadCommittedTransaction <T> (fn: (t: Transaction) => Promise<T>) {
111 return sequelizeTypescript.transaction(t => fn(t)) 111 const options = { isolationLevel: Transaction.ISOLATION_LEVELS.READ_COMMITTED }
112
113 return sequelizeTypescript.transaction(options, t => fn(t))
112} 114}
113 115
114function afterCommitIfTransaction (t: Transaction, fn: Function) { 116function afterCommitIfTransaction (t: Transaction, fn: Function) {