aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-11-15 09:40:19 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-12-05 06:24:48 +0800
commit80763337953b4ac575cacdbcfdf79227229966e3 (patch)
treea0ff5d66226df2c29b95b58910bdeb5dcff2a5c2
parentb0a2c10e11fa41e2800d4fe67d8008b5828128a3 (diff)
downloaddexon-0x-contracts-80763337953b4ac575cacdbcfdf79227229966e3.tar
dexon-0x-contracts-80763337953b4ac575cacdbcfdf79227229966e3.tar.gz
dexon-0x-contracts-80763337953b4ac575cacdbcfdf79227229966e3.tar.bz2
dexon-0x-contracts-80763337953b4ac575cacdbcfdf79227229966e3.tar.lz
dexon-0x-contracts-80763337953b4ac575cacdbcfdf79227229966e3.tar.xz
dexon-0x-contracts-80763337953b4ac575cacdbcfdf79227229966e3.tar.zst
dexon-0x-contracts-80763337953b4ac575cacdbcfdf79227229966e3.zip
Fix chunk size in pull_missing_events
-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.`);
}