Skip to content

Commit

Permalink
fix: Ensure historical invocations are configured correctly (#353)
Browse files Browse the repository at this point in the history
Previously, indexer executions were hardcoded to run with `isHistorical
= false`. This caused the `Current Block Height` to be incorrectly set
to the `Current Historical Block height`.

This PR updates Runner so that `isHistorical` is correctly set.
  • Loading branch information
morgsmccauley authored Nov 1, 2023
1 parent 2096c39 commit 19a125d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runner/src/stream-handler/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ void (async function main () {

let indexerName = '';
const streamType = redisClient.getStreamType(streamKey);
const isHistorical = streamType === 'historical';

while (true) {
try {
Expand All @@ -46,7 +47,7 @@ void (async function main () {
provisioned: false,
},
};
await indexer.runFunctions(Number(message.block_height), functions, false, {
await indexer.runFunctions(Number(message.block_height), functions, isHistorical, {
provision: true,
});

Expand Down

0 comments on commit 19a125d

Please sign in to comment.