Backfills automatically + prettier

This commit is contained in:
askeluv
2019-02-22 09:45:25 +08:00
parent 8885f543ae
commit bf1115d417
5 changed files with 28 additions and 28 deletions

View File

@@ -42,7 +42,9 @@ let connection: Connection;
const rawTransactions = await etherscanSource.getEtherscanTransactionsForAddressAsync(exchangeContractAddress);
const transactions = parseEtherscanTransactions(rawTransactions);
logUtils.log(`Saving ${transactions.length} records to database`);
await EtherscanTransactionRepository.save(transactions, { chunk: Math.ceil(transactions.length / BATCH_SAVE_SIZE) });
await EtherscanTransactionRepository.save(transactions, {
chunk: Math.ceil(transactions.length / BATCH_SAVE_SIZE),
});
logUtils.log('Done');
process.exit(0);
})().catch(handleError);