1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

fix: timeout issue on long time sql import

This commit is contained in:
2023-10-03 18:19:16 +02:00
parent 267c017921
commit ddd290c903
3 changed files with 13 additions and 11 deletions

View File

@ -240,9 +240,12 @@ export class PostgreSQLClient extends AntaresCore {
}
private async keepAlive () {
const connection = await this._connection.connect() as pg.PoolClient;
await connection.query('SELECT 1+1');
connection.release();
try {
const connection = await this._connection.connect() as pg.PoolClient;
await connection.query('SELECT 1+1');
connection.release();
}
catch (_) {}
}
use (schema: string, connection?: pg.Client | pg.PoolClient) {