mirror of
https://github.com/alexgo-io/stacks-blockchain-api.git
synced 2026-01-12 16:53:19 +08:00
fix: do not load duckdb binary unless required (#1776)
* fix: do not load duckdb binary unless required * chore: ignore buggy ts-unused-export line
This commit is contained in:
@@ -26,6 +26,7 @@ import { MIGRATIONS_DIR } from '../../datastore/pg-store';
|
|||||||
*
|
*
|
||||||
* It also has functions to prepare and finalize the database for an event-replay.
|
* It also has functions to prepare and finalize the database for an event-replay.
|
||||||
*/
|
*/
|
||||||
|
// ts-unused-exports:disable-next-line
|
||||||
export class ReplayController {
|
export class ReplayController {
|
||||||
private readonly db;
|
private readonly db;
|
||||||
private readonly dataset;
|
private readonly dataset;
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import { PgStore } from './datastore/pg-store';
|
|||||||
import { PgWriteStore } from './datastore/pg-write-store';
|
import { PgWriteStore } from './datastore/pg-write-store';
|
||||||
import { registerMempoolPromStats } from './datastore/helpers';
|
import { registerMempoolPromStats } from './datastore/helpers';
|
||||||
import { logger } from './logger';
|
import { logger } from './logger';
|
||||||
import { ReplayController } from './event-replay/parquet-based/replay-controller';
|
|
||||||
import {
|
import {
|
||||||
isProdEnv,
|
isProdEnv,
|
||||||
numberToHex,
|
numberToHex,
|
||||||
@@ -284,6 +283,7 @@ async function handleProgramArgs() {
|
|||||||
args.options.force
|
args.options.force
|
||||||
);
|
);
|
||||||
} else if (args.operand === 'from-parquet-events') {
|
} else if (args.operand === 'from-parquet-events') {
|
||||||
|
const { ReplayController } = await import('./event-replay/parquet-based/replay-controller');
|
||||||
const replay = await ReplayController.init();
|
const replay = await ReplayController.init();
|
||||||
await replay.prepare();
|
await replay.prepare();
|
||||||
await replay.do();
|
await replay.do();
|
||||||
|
|||||||
Reference in New Issue
Block a user