Skip to content

Commit

Permalink
Fixed the reindex runtime issue caused by missing API dependencies du…
Browse files Browse the repository at this point in the history
…ring reindexing (#300)
  • Loading branch information
yoozo authored Dec 6, 2024
1 parent c119671 commit 357fedf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

## [4.2.0] - 2024-11-27
### Added
- Support for historical indexing by timestamp as well as block height
Expand Down
13 changes: 11 additions & 2 deletions packages/node/src/subcommands/reindex.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
PoiService,
storeModelFactory,
NodeConfig,
ConnectionPoolStateManager,
ConnectionPoolService,
} from '@subql/node-core';
import { Sequelize } from '@subql/x-sequelize';
import { ConfigureModule } from '../configure/configure.module';
Expand Down Expand Up @@ -40,10 +42,17 @@ import { UnfinalizedBlocksService } from '../indexer/unfinalizedBlocks.service';
useClass: DynamicDsService,
},
DsProcessorService,
ConnectionPoolStateManager,
ConnectionPoolService,
{
// Used to work with DI for unfinalizedBlocksService but not used with reindex
provide: ApiService,
useFactory: () => undefined,
useFactory: ApiService.create.bind(ApiService),
inject: [
'ISubqueryProject',
ConnectionPoolService,
EventEmitter2,
NodeConfig,
],
},
SchedulerRegistry,
],
Expand Down

0 comments on commit 357fedf

Please sign in to comment.