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:
@ -256,9 +256,12 @@ export class MySQLClient extends AntaresCore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async keepAlive () {
|
private async keepAlive () {
|
||||||
const connection = await (this._connection as mysql.Pool).getConnection();
|
try {
|
||||||
await connection.ping();
|
const connection = await (this._connection as mysql.Pool).getConnection();
|
||||||
connection.release();
|
await connection.ping();
|
||||||
|
connection.release();
|
||||||
|
}
|
||||||
|
catch (_) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
use (schema: string) {
|
use (schema: string) {
|
||||||
|
@ -240,9 +240,12 @@ export class PostgreSQLClient extends AntaresCore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async keepAlive () {
|
private async keepAlive () {
|
||||||
const connection = await this._connection.connect() as pg.PoolClient;
|
try {
|
||||||
await connection.query('SELECT 1+1');
|
const connection = await this._connection.connect() as pg.PoolClient;
|
||||||
connection.release();
|
await connection.query('SELECT 1+1');
|
||||||
|
connection.release();
|
||||||
|
}
|
||||||
|
catch (_) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
use (schema: string, connection?: pg.Client | pg.PoolClient) {
|
use (schema: string, connection?: pg.Client | pg.PoolClient) {
|
||||||
|
@ -27,11 +27,7 @@
|
|||||||
:title="t('general.cancel')"
|
:title="t('general.cancel')"
|
||||||
@click="killTabQuery()"
|
@click="killTabQuery()"
|
||||||
>
|
>
|
||||||
<BaseIcon
|
<BaseIcon icon-name="mdiWindowClose" :size="24" />
|
||||||
class="mr-1"
|
|
||||||
icon-name="mdiWindowCLose"
|
|
||||||
:size="24"
|
|
||||||
/>
|
|
||||||
<span class="d-invisible pr-1">{{ t('general.run') }}</span>
|
<span class="d-invisible pr-1">{{ t('general.run') }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
|
Reference in New Issue
Block a user