From 3caa0cc2b393d1836e54b178225acadc5ec30548 Mon Sep 17 00:00:00 2001 From: FredCoen <43670554+FredCoen@users.noreply.github.com> Date: Tue, 8 Apr 2025 10:25:53 +0200 Subject: [PATCH 1/2] run relayer without redis --- src/utils/RedisUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/RedisUtils.ts b/src/utils/RedisUtils.ts index 8bd1b0ffac..aba0606742 100644 --- a/src/utils/RedisUtils.ts +++ b/src/utils/RedisUtils.ts @@ -72,7 +72,8 @@ export const REDIS_URL = process.env.REDIS_URL || REDIS_URL_DEFAULT; // Make the redis client for a particular url essentially a singleton. const redisClients: { [url: string]: RedisClient } = {}; -export async function getRedis(logger?: winston.Logger, url = REDIS_URL): Promise { +export async function getRedis(logger?: winston.Logger, url?: string): Promise { + if (!url) return undefined; if (!redisClients[url]) { let redisClient: _RedisClient | undefined = undefined; const reconnectStrategy = (retries: number): number | Error => { From 38391c236f16cf789f844bc41ec7cd432e4c82e1 Mon Sep 17 00:00:00 2001 From: FredCoen <43670554+FredCoen@users.noreply.github.com> Date: Tue, 8 Apr 2025 10:31:56 +0200 Subject: [PATCH 2/2] Update .env.example --- .env.example | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index f367051b54..2759e905f8 100644 --- a/.env.example +++ b/.env.example @@ -144,7 +144,9 @@ PRIORITY_FEE_SCALER_10=0.1 # https://redis.io/docs/getting-started/ # Under the hood, the relayer will cache JSON-rpc request data from requests # like `eth_getBlock` in the Redis DB. -REDIS_URL="redis://127.0.0.1:6379" +# Redis connection URL. Set to "" to disable Redis. +# If you need Redis functionality, set to redis default "redis://127.0.0.1:6379" +REDIS_URL="" # A namespace that will be used to prefix all keys in the Redis DB. This is # useful if multiple relayers are running on the same Redis instance. This