Verified Commit a6a12dae authored by Chocobozzz's avatar Chocobozzz
Browse files

Fix run committed transation

parent 5d6395af
......@@ -108,7 +108,9 @@ function setAsUpdated (table: string, id: number, transaction?: Transaction) {
// ---------------------------------------------------------------------------
function runInReadCommittedTransaction <T> (fn: (t: Transaction) => Promise<T>) {
return sequelizeTypescript.transaction(t => fn(t))
const options = { isolationLevel: Transaction.ISOLATION_LEVELS.READ_COMMITTED }
return sequelizeTypescript.transaction(options, t => fn(t))
}
function afterCommitIfTransaction (t: Transaction, fn: Function) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment