From 375fa1ed0c13dd4f973c2adb825e4e02118adad6 Mon Sep 17 00:00:00 2001 From: Ewan Sheldon Date: Mon, 18 Sep 2023 14:57:57 +0200 Subject: [PATCH] return to scheduled job --- src/transactions.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/transactions.js b/src/transactions.js index 9d83573..4c30b32 100644 --- a/src/transactions.js +++ b/src/transactions.js @@ -298,11 +298,11 @@ const indexVaultTransactions = async _ => { const vaults = await getVaultAddresses(wallet, network); const transactions = await addVaultStatus((await Promise.all([ getERC20DepositsForVaults(vaults, erc20Tokens, wallet, provider), - // getAllEthDeposits(vaults), - // getWithdrawals(vaults, wallet, provider), - // getBorrows(vaults, wallet, provider), - // getRepays(vaults, wallet, provider), - // getLiquidations(smartVaultManagerContract, provider) + getAllEthDeposits(vaults), + getWithdrawals(vaults, wallet, provider), + getBorrows(vaults, wallet, provider), + getRepays(vaults, wallet, provider), + getLiquidations(smartVaultManagerContract, provider) ])).flat()); await saveToRedis(transactions); const endTs = getTs(); @@ -315,12 +315,12 @@ const indexVaultTransactions = async _ => { } const scheduleVaultTransactionIndexing = async _ => { - // const job = schedule.scheduleJob('2,32 * * * *', async _ => { + const job = schedule.scheduleJob('2,32 * * * *', async _ => { await indexVaultTransactions(); - // }); - // job.on('error', err => { - // console.log(err); - // }); + }); + job.on('error', err => { + console.log(err); + }); } module.exports = {