mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
feat(core): Add mysql pool size and increase it for CI (no-changelog) (#19347)
This commit is contained in:
@@ -113,6 +113,10 @@ class MysqlConfig {
|
||||
/** MySQL database user */
|
||||
@Env('DB_MYSQLDB_USER')
|
||||
user: string = 'root';
|
||||
|
||||
/** MySQL connection pool size */
|
||||
@Env('DB_MYSQLDB_POOL_SIZE')
|
||||
poolSize: number = 10;
|
||||
}
|
||||
|
||||
@Config
|
||||
|
||||
@@ -69,6 +69,7 @@ describe('GlobalConfig', () => {
|
||||
password: '',
|
||||
port: 3306,
|
||||
user: 'root',
|
||||
poolSize: 10,
|
||||
},
|
||||
postgresdb: {
|
||||
database: 'n8n',
|
||||
|
||||
@@ -157,6 +157,7 @@ describe('DbConnectionOptions', () => {
|
||||
port: 3306,
|
||||
user: 'root',
|
||||
password: 'password',
|
||||
poolSize: 10,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -175,6 +176,7 @@ describe('DbConnectionOptions', () => {
|
||||
password: 'password',
|
||||
migrations: mysqlMigrations,
|
||||
timezone: 'Z',
|
||||
poolSize: 10,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -193,6 +195,7 @@ describe('DbConnectionOptions', () => {
|
||||
password: 'password',
|
||||
migrations: mysqlMigrations,
|
||||
timezone: 'Z',
|
||||
poolSize: 10,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -135,10 +135,12 @@ export class DbConnectionOptions {
|
||||
}
|
||||
|
||||
private getMysqlConnectionOptions(dbType: 'mariadb' | 'mysqldb'): MysqlConnectionOptions {
|
||||
const { mysqldb: mysqlConfig } = this.config;
|
||||
return {
|
||||
type: dbType === 'mysqldb' ? 'mysql' : 'mariadb',
|
||||
...this.getCommonOptions(),
|
||||
...this.getOverrides('mysqldb'),
|
||||
poolSize: mysqlConfig.poolSize,
|
||||
migrations: mysqlMigrations,
|
||||
timezone: 'Z', // set UTC as default
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user