mirror of
https://github.com/alexgo-io/stacks-blockchain-api.git
synced 2026-01-12 08:34:40 +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.
|
||||
*/
|
||||
// ts-unused-exports:disable-next-line
|
||||
export class ReplayController {
|
||||
private readonly db;
|
||||
private readonly dataset;
|
||||
|
||||
@@ -20,7 +20,6 @@ import { PgStore } from './datastore/pg-store';
|
||||
import { PgWriteStore } from './datastore/pg-write-store';
|
||||
import { registerMempoolPromStats } from './datastore/helpers';
|
||||
import { logger } from './logger';
|
||||
import { ReplayController } from './event-replay/parquet-based/replay-controller';
|
||||
import {
|
||||
isProdEnv,
|
||||
numberToHex,
|
||||
@@ -284,6 +283,7 @@ async function handleProgramArgs() {
|
||||
args.options.force
|
||||
);
|
||||
} else if (args.operand === 'from-parquet-events') {
|
||||
const { ReplayController } = await import('./event-replay/parquet-based/replay-controller');
|
||||
const replay = await ReplayController.init();
|
||||
await replay.prepare();
|
||||
await replay.do();
|
||||
|
||||
Reference in New Issue
Block a user