diff --git a/src/utils.js b/src/utils.js index 49fe59b..6845745 100644 --- a/src/utils.js +++ b/src/utils.js @@ -84,10 +84,14 @@ const readRelayerErrors = async redis => { return errors } +const clearRelayerErrors = redis => { + redis.del('errors') +} module.exports = { getInstance, setSafeInterval, fromDecimals, logRelayerError, readRelayerErrors, + clearRelayerErrors, } diff --git a/src/worker.js b/src/worker.js index b120620..03ab235 100644 --- a/src/worker.js +++ b/src/worker.js @@ -4,7 +4,7 @@ const { toBN, toWei, fromWei, toHex } = require('web3-utils') const { redis } = require('./modules/redis') const proxyLightABI = require('../abis/proxyLightABI.json') const { queue } = require('./queue') -const { getInstance, fromDecimals, logRelayerError } = require('./utils') +const { getInstance, fromDecimals, logRelayerError, clearRelayerErrors } = require('./utils') const { jobType, status } = require('./constants') const { netId, @@ -27,6 +27,7 @@ let gasPriceOracle function start() { try { web3 = new Web3(httpRpcUrl) + clearRelayerErrors(redis) const { CONFIRMATIONS, MAX_GAS_PRICE } = process.env const gasPriceOracleConfig = { chainId: netId,