From 8b2260636e0ca7a6e6fe9c3ab8606f953f9a2e72 Mon Sep 17 00:00:00 2001 From: Tate Date: Fri, 6 Dec 2024 06:42:26 +0000 Subject: [PATCH] Fixed the reindex runtime issue caused by missing API dependencies during reindexing --- packages/node/CHANGELOG.md | 3 +++ packages/node/src/subcommands/reindex.module.ts | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/node/CHANGELOG.md b/packages/node/CHANGELOG.md index b2366df7..4d60a2b1 100644 --- a/packages/node/CHANGELOG.md +++ b/packages/node/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- Missing API dependency when using reindex + ## [3.15.0] - 2024-11-26 ### Added - Support for historical indexing by timestamp as well as block height diff --git a/packages/node/src/subcommands/reindex.module.ts b/packages/node/src/subcommands/reindex.module.ts index fb46670e..78536461 100644 --- a/packages/node/src/subcommands/reindex.module.ts +++ b/packages/node/src/subcommands/reindex.module.ts @@ -5,6 +5,8 @@ import { Module } from '@nestjs/common'; import { EventEmitter2, EventEmitterModule } from '@nestjs/event-emitter'; import { SchedulerRegistry } from '@nestjs/schedule'; import { + ConnectionPoolService, + ConnectionPoolStateManager, DbModule, ForceCleanService, NodeConfig, @@ -32,10 +34,12 @@ import { DynamicDsService } from '../indexer/dynamic-ds.service'; DynamicDsService, PoiService, DsProcessorService, + ConnectionPoolStateManager, + ConnectionPoolService, { - // Used to work with DI for unfinalizedBlocksService but not used with reindex provide: AlgorandApiService, - useFactory: () => undefined, + useFactory: AlgorandApiService.init, + inject: ['ISubqueryProject', ConnectionPoolService, EventEmitter2], }, SchedulerRegistry, ],