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:
2
.github/workflows/ci-postgres-mysql.yml
vendored
2
.github/workflows/ci-postgres-mysql.yml
vendored
@@ -62,6 +62,7 @@ jobs:
|
|||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
env:
|
env:
|
||||||
DB_MYSQLDB_PASSWORD: password
|
DB_MYSQLDB_PASSWORD: password
|
||||||
|
DB_MYSQLDB_POOL_SIZE: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
@@ -86,6 +87,7 @@ jobs:
|
|||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
env:
|
env:
|
||||||
DB_MYSQLDB_PASSWORD: password
|
DB_MYSQLDB_PASSWORD: password
|
||||||
|
DB_MYSQLDB_POOL_SIZE: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
|
|||||||
@@ -113,6 +113,10 @@ class MysqlConfig {
|
|||||||
/** MySQL database user */
|
/** MySQL database user */
|
||||||
@Env('DB_MYSQLDB_USER')
|
@Env('DB_MYSQLDB_USER')
|
||||||
user: string = 'root';
|
user: string = 'root';
|
||||||
|
|
||||||
|
/** MySQL connection pool size */
|
||||||
|
@Env('DB_MYSQLDB_POOL_SIZE')
|
||||||
|
poolSize: number = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Config
|
@Config
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ describe('GlobalConfig', () => {
|
|||||||
password: '',
|
password: '',
|
||||||
port: 3306,
|
port: 3306,
|
||||||
user: 'root',
|
user: 'root',
|
||||||
|
poolSize: 10,
|
||||||
},
|
},
|
||||||
postgresdb: {
|
postgresdb: {
|
||||||
database: 'n8n',
|
database: 'n8n',
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ describe('DbConnectionOptions', () => {
|
|||||||
port: 3306,
|
port: 3306,
|
||||||
user: 'root',
|
user: 'root',
|
||||||
password: 'password',
|
password: 'password',
|
||||||
|
poolSize: 10,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -175,6 +176,7 @@ describe('DbConnectionOptions', () => {
|
|||||||
password: 'password',
|
password: 'password',
|
||||||
migrations: mysqlMigrations,
|
migrations: mysqlMigrations,
|
||||||
timezone: 'Z',
|
timezone: 'Z',
|
||||||
|
poolSize: 10,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -193,6 +195,7 @@ describe('DbConnectionOptions', () => {
|
|||||||
password: 'password',
|
password: 'password',
|
||||||
migrations: mysqlMigrations,
|
migrations: mysqlMigrations,
|
||||||
timezone: 'Z',
|
timezone: 'Z',
|
||||||
|
poolSize: 10,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -135,10 +135,12 @@ export class DbConnectionOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private getMysqlConnectionOptions(dbType: 'mariadb' | 'mysqldb'): MysqlConnectionOptions {
|
private getMysqlConnectionOptions(dbType: 'mariadb' | 'mysqldb'): MysqlConnectionOptions {
|
||||||
|
const { mysqldb: mysqlConfig } = this.config;
|
||||||
return {
|
return {
|
||||||
type: dbType === 'mysqldb' ? 'mysql' : 'mariadb',
|
type: dbType === 'mysqldb' ? 'mysql' : 'mariadb',
|
||||||
...this.getCommonOptions(),
|
...this.getCommonOptions(),
|
||||||
...this.getOverrides('mysqldb'),
|
...this.getOverrides('mysqldb'),
|
||||||
|
poolSize: mysqlConfig.poolSize,
|
||||||
migrations: mysqlMigrations,
|
migrations: mysqlMigrations,
|
||||||
timezone: 'Z', // set UTC as default
|
timezone: 'Z', // set UTC as default
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user