Fix retry on error for events processing job with exponential backoff (#468)

* Throw error in job-runner events processing queue for retry

* Restart block processing after completion of retried events queue job

* Check events queue size in retry state from active historical processing job

* Clear watched contracts from memory map on reset

* Update sync status with zero hash during historical processing

* Update codegen for changes

* Add clearProcessedBlockData in graph-node test dummy indexer
This commit is contained in:
2023-11-14 14:53:23 +05:30
committed by GitHub
parent 7b5fbf3d13
commit 803f7c3b3d
7 changed files with 169 additions and 116 deletions
@@ -759,6 +759,19 @@ export class Indexer implements IndexerInterface {
await this.resetLatestEntities(blockNumber);
{{/if}}
}
async clearProcessedBlockData (block: BlockProgress): Promise<void> {
{{#if (subgraphPath)}}
const entities = [...ENTITIES, FrothyEntity];
{{else}}
const entities = [...ENTITIES];
{{/if}}
await this._baseIndexer.clearProcessedBlockData(block, entities);
{{#if (subgraphPath)}}
await this.resetLatestEntities(block.blockNumber);
{{/if}}
}
{{#if (subgraphPath)}}
getEntityTypesMap (): Map<string, { [key: string]: string }> {