Merge pull request #1381 from chaotixkilla/fix-potential-concurrent-update-during-cashin
Reduce occurrence of concurrent updates on 'devices' table during cash-in transactions
This commit is contained in:
commit
dbd34c937c
2 changed files with 0 additions and 9 deletions
|
|
@ -1,9 +1,6 @@
|
|||
const _ = require('lodash/fp')
|
||||
|
||||
const db = require('../db')
|
||||
const state = require('./state')
|
||||
const newSettingsLoader = require('../new-settings-loader')
|
||||
const helpers = require('../route-helpers')
|
||||
const logger = require('../logger')
|
||||
|
||||
db.connect({ direct: true }).then(sco => {
|
||||
|
|
@ -80,7 +77,6 @@ const populateSettings = function (req, res, next) {
|
|||
|
||||
newSettingsLoader.load(versionId)
|
||||
.then(settings => { req.settings = settings })
|
||||
.then(() => helpers.updateDeviceConfigVersion(versionId))
|
||||
.then(() => next())
|
||||
.catch(next)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,14 +85,9 @@ function fetchStatusTx (txId, status) {
|
|||
})
|
||||
}
|
||||
|
||||
function updateDeviceConfigVersion (versionId) {
|
||||
return db.none('update devices set user_config_id=$1', [versionId])
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
stateChange,
|
||||
fetchPhoneTx,
|
||||
fetchStatusTx,
|
||||
updateDeviceConfigVersion,
|
||||
httpError
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue