Created
February 6, 2019 21:40
-
-
Save feuGeneA/895593fec309fb406aa11434846ba27b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/packages/pipeline/src/scripts/pull_exchange_events.ts b/packages/pipeline/src/scripts/pull_exchange_events.ts | |
index 92c08267f..9b03cac53 100644 | |
--- a/packages/pipeline/src/scripts/pull_exchange_events.ts | |
+++ b/packages/pipeline/src/scripts/pull_exchange_events.ts | |
@@ -39,6 +39,7 @@ async function getFillEventsAsync(eventsSource: ExchangeEventsSource, endBlock: | |
const eventLogs = await eventsSource.getFillEventsAsync(startBlock, endBlock); | |
logUtils.log('Parsing fill events...'); | |
const events = parseExchangeFillEvents(eventLogs); | |
+ events.push(events[0]); | |
logUtils.log(`Retrieved and parsed ${events.length} total fill events.`); | |
await saveEventsAsync(startBlock === EXCHANGE_START_BLOCK, repository, events); | |
} | |
@@ -101,7 +102,7 @@ async function saveEventsAsync<T extends ExchangeEvent>( | |
} else { | |
// If we possibly have some overlap where we need to update some | |
// existing events, we need to use our workaround/fallback. | |
- await saveIndividuallyWithFallbackAsync(repository, events); | |
+ await repository.save(events as any); | |
} | |
const totalEvents = await repository.count(); | |
logUtils.log(`Done saving events. There are now ${totalEvents} total ${repository.metadata.name}s.`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment