diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-11-15 09:40:19 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-12-05 06:24:48 +0800 |
commit | 80763337953b4ac575cacdbcfdf79227229966e3 (patch) | |
tree | a0ff5d66226df2c29b95b58910bdeb5dcff2a5c2 /packages/pipeline/src/scripts | |
parent | b0a2c10e11fa41e2800d4fe67d8008b5828128a3 (diff) | |
download | dexon-0x-contracts-80763337953b4ac575cacdbcfdf79227229966e3.tar.gz dexon-0x-contracts-80763337953b4ac575cacdbcfdf79227229966e3.tar.zst dexon-0x-contracts-80763337953b4ac575cacdbcfdf79227229966e3.zip |
Fix chunk size in pull_missing_events
Diffstat (limited to 'packages/pipeline/src/scripts')
-rw-r--r-- | packages/pipeline/src/scripts/pull_missing_events.ts | 2 |
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.`); } |