mirror of https://github.com/Fabio286/antares.git
fix: timeout issue on long time sql import
This commit is contained in:
parent
267c017921
commit
ddd290c903
|
@ -256,9 +256,12 @@ export class MySQLClient extends AntaresCore {
|
|||
}
|
||||
|
||||
private async keepAlive () {
|
||||
const connection = await (this._connection as mysql.Pool).getConnection();
|
||||
await connection.ping();
|
||||
connection.release();
|
||||
try {
|
||||
const connection = await (this._connection as mysql.Pool).getConnection();
|
||||
await connection.ping();
|
||||
connection.release();
|
||||
}
|
||||
catch (_) {}
|
||||
}
|
||||
|
||||
use (schema: string) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -27,11 +27,7 @@
|
|||
:title="t('general.cancel')"
|
||||
@click="killTabQuery()"
|
||||
>
|
||||
<BaseIcon
|
||||
class="mr-1"
|
||||
icon-name="mdiWindowCLose"
|
||||
:size="24"
|
||||
/>
|
||||
<BaseIcon icon-name="mdiWindowClose" :size="24" />
|
||||
<span class="d-invisible pr-1">{{ t('general.run') }}</span>
|
||||
</button>
|
||||
<button
|
||||
|
|
Loading…
Reference in New Issue