aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/database.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2018-07-28 21:02:26 +0200
committerChocobozzz <me@florianbigard.com>2018-07-31 15:38:08 +0200
commit1c3386e87f947d5b1dabb9be6a3b1a5d0fbf0d50 (patch)
treef4a4efecf5d94fe1a98508db9e4ac26c0a2f8ef4 /server/initializers/database.ts
parent040467f5c8cba429176423d5e4b83bf5379ad101 (diff)
downloadPeerTube-1c3386e87f947d5b1dabb9be6a3b1a5d0fbf0d50.tar.gz
PeerTube-1c3386e87f947d5b1dabb9be6a3b1a5d0fbf0d50.tar.zst
PeerTube-1c3386e87f947d5b1dabb9be6a3b1a5d0fbf0d50.zip
adding ORM pool configuration
Diffstat (limited to 'server/initializers/database.ts')
-rw-r--r--server/initializers/database.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/initializers/database.ts b/server/initializers/database.ts
index 1a9ce5a61..21c083084 100644
--- a/server/initializers/database.ts
+++ b/server/initializers/database.ts
@@ -32,6 +32,7 @@ const username = CONFIG.DATABASE.USERNAME
32const password = CONFIG.DATABASE.PASSWORD 32const password = CONFIG.DATABASE.PASSWORD
33const host = CONFIG.DATABASE.HOSTNAME 33const host = CONFIG.DATABASE.HOSTNAME
34const port = CONFIG.DATABASE.PORT 34const port = CONFIG.DATABASE.PORT
35const poolMax = CONFIG.DATABASE.POOL.MAX
35 36
36const sequelizeTypescript = new SequelizeTypescript({ 37const sequelizeTypescript = new SequelizeTypescript({
37 database: dbname, 38 database: dbname,
@@ -40,6 +41,9 @@ const sequelizeTypescript = new SequelizeTypescript({
40 port, 41 port,
41 username, 42 username,
42 password, 43 password,
44 pool: {
45 max: poolMax
46 },
43 benchmark: isTestInstance(), 47 benchmark: isTestInstance(),
44 isolationLevel: SequelizeTypescript.Transaction.ISOLATION_LEVELS.SERIALIZABLE, 48 isolationLevel: SequelizeTypescript.Transaction.ISOLATION_LEVELS.SERIALIZABLE,
45 operatorsAliases: false, 49 operatorsAliases: false,