Feat: upgrade pg-promise and fix breaking changes
This commit is contained in:
parent
c4ea21259a
commit
8cd1389de3
7 changed files with 79 additions and 83 deletions
|
|
@ -19,7 +19,11 @@ const MAX_PENDING = 10
|
|||
module.exports = { post, monitorPending, cancel, PENDING_INTERVAL }
|
||||
|
||||
function post (machineTx, pi) {
|
||||
return db.tx(cashInAtomic.atomic(machineTx, pi))
|
||||
const TransactionMode = pgp.txMode.TransactionMode
|
||||
const isolationLevel = pgp.txMode.isolationLevel
|
||||
const mode = new TransactionMode({ tiLevel: isolationLevel.serializable })
|
||||
|
||||
return db.tx({ mode }, cashInAtomic.atomic(machineTx, pi))
|
||||
.then(r => {
|
||||
const updatedTx = r.tx
|
||||
let blacklisted = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue