mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-28 08:49:38 +02:00
refactor: remove legacy historic sql pipeline
This commit is contained in:
parent
b3ebba9f88
commit
d47826a234
31 changed files with 332 additions and 5419 deletions
|
|
@ -75,7 +75,7 @@ function failureDetail(error: unknown): string {
|
|||
async function defaultPostgresHistoricSqlProbe(
|
||||
input: PostgresHistoricSqlDoctorProbeInput,
|
||||
): Promise<PostgresHistoricSqlDoctorProbeResult> {
|
||||
const [{ PostgresPgssQueryHistoryReader }, { KtxPostgresHistoricSqlQueryClient, isKtxPostgresConnectionConfig }] =
|
||||
const [{ PostgresPgssReader }, { KtxPostgresHistoricSqlQueryClient, isKtxPostgresConnectionConfig }] =
|
||||
await Promise.all([import('@ktx/context/ingest'), import('@ktx/connector-postgres')]);
|
||||
|
||||
if (!isKtxPostgresConnectionConfig(input.connection)) {
|
||||
|
|
@ -88,7 +88,7 @@ async function defaultPostgresHistoricSqlProbe(
|
|||
env: input.env,
|
||||
});
|
||||
try {
|
||||
return await new PostgresPgssQueryHistoryReader().probe(client);
|
||||
return await new PostgresPgssReader().probe(client);
|
||||
} finally {
|
||||
await client.cleanup();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ async function defaultHistoricSqlProbe(input: KtxSetupHistoricSqlProbeInput): Pr
|
|||
|
||||
const project = await loadKtxProject({ projectDir: input.projectDir });
|
||||
const connection = project.config.connections[input.connectionId];
|
||||
const [{ PostgresPgssQueryHistoryReader }, { KtxPostgresHistoricSqlQueryClient, isKtxPostgresConnectionConfig }] =
|
||||
const [{ PostgresPgssReader }, { KtxPostgresHistoricSqlQueryClient, isKtxPostgresConnectionConfig }] =
|
||||
await Promise.all([import('@ktx/context/ingest'), import('@ktx/connector-postgres')]);
|
||||
|
||||
const postgresConnection = connection as Parameters<typeof isKtxPostgresConnectionConfig>[0];
|
||||
|
|
@ -242,7 +242,7 @@ async function defaultHistoricSqlProbe(input: KtxSetupHistoricSqlProbeInput): Pr
|
|||
connection: postgresConnection,
|
||||
});
|
||||
try {
|
||||
const result = await new PostgresPgssQueryHistoryReader().probe(client);
|
||||
const result = await new PostgresPgssReader().probe(client);
|
||||
return {
|
||||
ok: true,
|
||||
lines: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue