Skip to content

Commit

Permalink
return to scheduled job
Browse files Browse the repository at this point in the history
  • Loading branch information
ewansheldon committed Sep 18, 2023
1 parent 300c5b3 commit 375fa1e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/transactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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 = {
Expand Down

0 comments on commit 375fa1e

Please sign in to comment.