mirror of https://github.com/Chocobozzz/PeerTube
Server: transaction serializable for videos
parent
f2cdb86675
commit
edc5e86006
|
@ -203,7 +203,7 @@ function updateRemoteVideo (videoAttributesToUpdate, fromPod, finalCallback) {
|
||||||
waterfall([
|
waterfall([
|
||||||
|
|
||||||
function startTransaction (callback) {
|
function startTransaction (callback) {
|
||||||
db.sequelize.transaction().asCallback(function (err, t) {
|
db.sequelize.transaction({ isolationLevel: 'SERIALIZABLE' }).asCallback(function (err, t) {
|
||||||
return callback(err, t)
|
return callback(err, t)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -264,7 +264,7 @@ function updateVideo (req, res, finalCallback) {
|
||||||
waterfall([
|
waterfall([
|
||||||
|
|
||||||
function startTransaction (callback) {
|
function startTransaction (callback) {
|
||||||
db.sequelize.transaction().asCallback(function (err, t) {
|
db.sequelize.transaction({ isolationLevel: 'SERIALIZABLE' }).asCallback(function (err, t) {
|
||||||
return callback(err, t)
|
return callback(err, t)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -174,7 +174,7 @@ function makeRequests () {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
logger.info('Making requests to friends.', { requests: requestsToMakeGrouped })
|
logger.info('Making requests to friends.')
|
||||||
|
|
||||||
const goodPods = []
|
const goodPods = []
|
||||||
const badPods = []
|
const badPods = []
|
||||||
|
|
Loading…
Reference in New Issue