From 105d4a059e5792fbf3287a2a65b9bf8a986bd9c1 Mon Sep 17 00:00:00 2001 From: JQQQ Date: Tue, 9 Apr 2024 14:59:43 +1200 Subject: [PATCH] Fix workers --- .../indexer/dictionary/algorandDictionary.service.ts | 3 +-- packages/node/src/indexer/worker/worker.service.ts | 12 ++++++------ packages/node/src/indexer/worker/worker.ts | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/node/src/indexer/dictionary/algorandDictionary.service.ts b/packages/node/src/indexer/dictionary/algorandDictionary.service.ts index d4d5641c..422bb036 100644 --- a/packages/node/src/indexer/dictionary/algorandDictionary.service.ts +++ b/packages/node/src/indexer/dictionary/algorandDictionary.service.ts @@ -62,9 +62,8 @@ export class AlgorandDictionaryService extends DictionaryService< nodeConfig: NodeConfig, eventEmitter: EventEmitter2, protected dsProcessorService: DsProcessorService, - chainId?: string, ) { - super(chainId ?? project.network.chainId, nodeConfig, eventEmitter); + super(project.network.chainId, nodeConfig, eventEmitter); } private getV1Dictionary(): AlgorandDictionaryV1 | undefined { diff --git a/packages/node/src/indexer/worker/worker.service.ts b/packages/node/src/indexer/worker/worker.service.ts index 07572a38..3f78be29 100644 --- a/packages/node/src/indexer/worker/worker.service.ts +++ b/packages/node/src/indexer/worker/worker.service.ts @@ -11,7 +11,11 @@ import { IBlock, } from '@subql/node-core'; import { AlgorandBlock, AlgorandDataSource } from '@subql/types-algorand'; -import { AlgorandApi, SafeAPIService } from '../../algorand'; +import { + AlgorandApi, + AlgorandApiService, + SafeAPIService, +} from '../../algorand'; import { AlgorandProjectDs } from '../../configure/SubqueryProject'; import { IndexerManager } from '../indexer.manager'; import { BlockContent } from '../types'; @@ -39,11 +43,7 @@ export class WorkerService extends BaseWorkerService< {} > { constructor( - private apiService: ApiService< - AlgorandApi, - SafeAPIService, - IBlock[] - >, + private apiService: AlgorandApiService, private indexerManager: IndexerManager, @Inject('IProjectService') projectService: IProjectService, diff --git a/packages/node/src/indexer/worker/worker.ts b/packages/node/src/indexer/worker/worker.ts index 7830aa7e..b852a182 100644 --- a/packages/node/src/indexer/worker/worker.ts +++ b/packages/node/src/indexer/worker/worker.ts @@ -34,7 +34,7 @@ const logger = getLogger(`worker #${threadId}`); async function initWorker(startHeight: number): Promise { try { const app = await NestFactory.create(WorkerModule, { - logger: new NestLogger(!!argv.debug), // TIP: If the worker is crashing comment out this line for better logging + // logger: new NestLogger(!!argv.debug), // TIP: If the worker is crashing comment out this line for better logging }); await app.init();