diff options
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/database-utils.ts | 4 |
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 | ||
110 | function runInReadCommittedTransaction <T> (fn: (t: Transaction) => Promise<T>) { | 110 | function 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 | ||
114 | function afterCommitIfTransaction (t: Transaction, fn: Function) { | 116 | function afterCommitIfTransaction (t: Transaction, fn: Function) { |