diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-05-22 20:58:25 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-05-25 17:32:16 +0200 |
commit | e02643f32e4c97ca307f8fc5b69be79c40d70a3b (patch) | |
tree | b7f6269913cd5a0e4f26a9461a043deb0c168be0 /server/helpers/database-utils.ts | |
parent | 65fcc3119c334b75dd13bcfdebf186afdc580a8f (diff) | |
download | PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.tar.gz PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.tar.zst PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.zip |
Type models
Diffstat (limited to 'server/helpers/database-utils.ts')
-rw-r--r-- | server/helpers/database-utils.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/helpers/database-utils.ts b/server/helpers/database-utils.ts index b842ab9ec..7d6ce4ec8 100644 --- a/server/helpers/database-utils.ts +++ b/server/helpers/database-utils.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | // TODO: import from ES6 when retry typing file will include errorFilter function | 1 | // TODO: import from ES6 when retry typing file will include errorFilter function |
2 | import retry = require('async/retry') | 2 | import retry = require('async/retry') |
3 | 3 | ||
4 | const db = require('../initializers/database') | 4 | import { database as db } from '../initializers/database' |
5 | import { logger } from './logger' | 5 | import { logger } from './logger' |
6 | 6 | ||
7 | function commitTransaction (t, callback) { | 7 | function commitTransaction (t, callback) { |
@@ -52,7 +52,7 @@ function transactionRetryer (func, callback) { | |||
52 | } | 52 | } |
53 | 53 | ||
54 | function startSerializableTransaction (callback) { | 54 | function startSerializableTransaction (callback) { |
55 | db.sequelize.transaction({ isolationLevel: 'SERIALIZABLE' }).asCallback(function (err, t) { | 55 | db.sequelize.transaction(/* { isolationLevel: 'SERIALIZABLE' } */).asCallback(function (err, t) { |
56 | // We force to return only two parameters | 56 | // We force to return only two parameters |
57 | return callback(err, t) | 57 | return callback(err, t) |
58 | }) | 58 | }) |