diff --git a/src/index.ts b/src/index.ts index 4557d0f..df29d68 100644 --- a/src/index.ts +++ b/src/index.ts @@ -92,6 +92,12 @@ createConnection(ormConfig as ConnectionOptions) if (SCRAPER_MODE === 'BLOCKS') { schedule(connection, producer, blockEventsScraper.getParseSaveAsync, 'Pull and Save Blocks and Events'); schedule(connection, producer, blockEventsScraper.backfillAsync, 'Backfill Blocks and Events'); + schedule( + connection, + producer, + backfillTxScraper.getParseSaveTxBackfillAsync, + 'Pull and Save Backfill Transactions', + ); schedule(connection, producer, eventsBackfillScraper.getParseSaveEventsAsync, 'Backfill Events by Topic'); } else if (SCRAPER_MODE === 'EVENTS') { schedule(null, null, currentBlockMonitor.monitor, 'Current Block'); diff --git a/src/scripts/pull_and_save_block_events.ts b/src/scripts/pull_and_save_block_events.ts index ea804c4..99a1844 100644 --- a/src/scripts/pull_and_save_block_events.ts +++ b/src/scripts/pull_and_save_block_events.ts @@ -359,7 +359,7 @@ export class BlockEventsScraper { const oldestBlocksToBackfill = await connection.query( `SELECT DISTINCT block_number - FROM ${SCHEMA}.tx_backfill + FROM ${SCHEMA}.block_backfill WHERE done = false ORDER BY block_number LIMIT ${MAX_BLOCKS_TO_PULL}`, @@ -379,7 +379,7 @@ export class BlockEventsScraper { const queryRunner = connection.createQueryRunner(); await queryRunner.connect(); await queryRunner.manager.query( - `UPDATE ${SCHEMA}.tx_backfill + `UPDATE ${SCHEMA}.block_backfill SET done = true WHERE block_number IN (${newBlockNumbers.join(',')})`, );