Handle restarts during historical processing in watcher (#455)

* Reset to latest processed block on restarting job-runner

* Update sync status during historical processing in job-runner

* Codegen changes

* Use sync status latest processed block for subgraph _meta GQL query

* Set job per interval for subscribing events queue to 1

* Fix events processing skipped for blocks after template create
This commit is contained in:
2023-11-08 14:28:53 +05:30
committed by GitHub
parent 97bd4014d6
commit f2c5f67777
14 changed files with 207 additions and 137 deletions
+4 -3
View File
@@ -170,17 +170,18 @@ export class Indexer implements IndexerInterface {
return {} as SyncStatusInterface;
}
async forceUpdateSyncStatus (blockHash: string, blockNumber: number): Promise<SyncStatusInterface> {
async updateSyncStatusProcessedBlock (blockHash: string, blockNumber: number, force?: boolean): Promise<SyncStatusInterface> {
assert(blockNumber);
assert(blockHash);
assert(force);
return {} as SyncStatusInterface;
}
async updateSyncStatusIndexingError (hasIndexingError: boolean): Promise<SyncStatusInterface> {
async updateSyncStatusIndexingError (hasIndexingError: boolean): Promise<SyncStatusInterface | undefined> {
assert(hasIndexingError);
return {} as SyncStatusInterface;
return undefined;
}
async markBlocksAsPruned (blocks: BlockProgressInterface[]): Promise<void> {