log errors to redis

This commit is contained in:
smart_ex 2022-04-11 20:44:49 +10:00 committed by Danil Kovtonyuk
parent 92bc3bb0a8
commit e5dd4b465f
3 changed files with 3 additions and 3 deletions

@ -4,7 +4,7 @@ const { setSafeInterval } = require('./utils')
const { httpRpcUrl, privateKey, minimumBalance, nativeCurrency, instances } = require('./config')
const web3 = new Web3(httpRpcUrl)
const { redis } = require('modules/redis')
const { redis } = require('./modules/redis')
async function main() {
try {

@ -6,7 +6,7 @@ const { redis } = require('./modules/redis')
async function status(req, res) {
const health = await redis.hgetall('health')
health.errorsLog = readRelayerErrors(redis)
health.errorsLog = await readRelayerErrors(redis)
const { waiting: currentQueue } = await queue.queue.getJobCounts()
res.json({

@ -1,7 +1,7 @@
const Web3 = require('web3')
const { GasPriceOracle } = require('gas-price-oracle')
const { toBN, toWei, fromWei, toHex } = require('web3-utils')
const { redis } = require('modules/redis')
const { redis } = require('./modules/redis')
const proxyLightABI = require('../abis/proxyLightABI.json')
const { queue } = require('./queue')
const { getInstance, fromDecimals, logRelayerError } = require('./utils')