aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-11-15 09:40:19 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-06 19:04:25 +0800
commita0a41b1b5d4f9bcaf4fd15ccf628e7e6b88b4621 (patch)
tree863148475bf5ccba68f47bd2aaf2ffb04394e1f9 /packages
parentf07dc5ae6d4cc928e4d00708e3f90f7cf9b4836d (diff)
downloaddexon-sol-tools-a0a41b1b5d4f9bcaf4fd15ccf628e7e6b88b4621.tar
dexon-sol-tools-a0a41b1b5d4f9bcaf4fd15ccf628e7e6b88b4621.tar.gz
dexon-sol-tools-a0a41b1b5d4f9bcaf4fd15ccf628e7e6b88b4621.tar.bz2
dexon-sol-tools-a0a41b1b5d4f9bcaf4fd15ccf628e7e6b88b4621.tar.lz
dexon-sol-tools-a0a41b1b5d4f9bcaf4fd15ccf628e7e6b88b4621.tar.xz
dexon-sol-tools-a0a41b1b5d4f9bcaf4fd15ccf628e7e6b88b4621.tar.zst
dexon-sol-tools-a0a41b1b5d4f9bcaf4fd15ccf628e7e6b88b4621.zip
Fix chunk size in pull_missing_events
Diffstat (limited to 'packages')
-rw-r--r--packages/pipeline/src/scripts/pull_missing_events.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/pipeline/src/scripts/pull_missing_events.ts b/packages/pipeline/src/scripts/pull_missing_events.ts
index b1b8665dd..f53bc12bd 100644
--- a/packages/pipeline/src/scripts/pull_missing_events.ts
+++ b/packages/pipeline/src/scripts/pull_missing_events.ts
@@ -38,7 +38,7 @@ async function getExchangeEventsAsync(provider: Web3ProviderEngine): Promise<voi
const events = parseExchangeEvents(eventLogs);
console.log(`Retrieved and parsed ${events.length} total events.`);
console.log('Saving events...');
- await eventsRepository.save(events, { chunk: BATCH_SAVE_SIZE });
+ await eventsRepository.save(events, { chunk: Math.ceil(events.length / BATCH_SAVE_SIZE) });
const totalEvents = await eventsRepository.count();
console.log(`Done saving events. There are now ${totalEvents} total events.`);
}