mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-08 16:54:08 +00:00
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:
@@ -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 }> {
|
||||
|
||||
Reference in New Issue
Block a user