From b1d5f0bc13c2f84ffa1036414bbd622b660433ef Mon Sep 17 00:00:00 2001 From: Krzysztof Jamrog Date: Fri, 30 Aug 2024 09:42:45 +0200 Subject: [PATCH 1/4] AP-5015 added maxRetriesPerRequest to RedisConfig --- src/config/configTypes.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config/configTypes.ts b/src/config/configTypes.ts index 1c26166..1526210 100644 --- a/src/config/configTypes.ts +++ b/src/config/configTypes.ts @@ -13,6 +13,7 @@ export type RedisConfig = { password?: string commandTimeout?: number connectTimeout?: number + maxRetriesPerRequest?: number | null useTls: boolean } From a61cb729573976eff1b5af4133da45ed554bc50f Mon Sep 17 00:00:00 2001 From: Krzysztof Jamrog Date: Fri, 30 Aug 2024 09:47:37 +0200 Subject: [PATCH 2/4] AP-5015 linting --- package.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/package.json b/package.json index 51459d6..04c1ab8 100644 --- a/package.json +++ b/package.json @@ -11,11 +11,7 @@ "url": "git://github.com/lokalise/node-core.git" }, "license": "Apache-2.0", - "files": [ - "dist/**", - "LICENSE", - "README.md" - ], + "files": ["dist/**", "LICENSE", "README.md"], "main": "dist/index.js", "types": "dist/index.d.ts", "type": "commonjs", From d0f8067d4b0eed1323afc5ddb77c5e7475eabb30 Mon Sep 17 00:00:00 2001 From: Krzysztof Jamrog Date: Fri, 30 Aug 2024 11:24:01 +0200 Subject: [PATCH 3/4] AP-5015 added more parameters to RedisConfig --- src/config/configTypes.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config/configTypes.ts b/src/config/configTypes.ts index 1526210..ccb4af8 100644 --- a/src/config/configTypes.ts +++ b/src/config/configTypes.ts @@ -14,6 +14,8 @@ export type RedisConfig = { commandTimeout?: number connectTimeout?: number maxRetriesPerRequest?: number | null + enableReadyCheck?: boolean + lazyConnect?: boolean useTls: boolean } From ce1a6c04dd35a6d753c364460d23a54983243c6b Mon Sep 17 00:00:00 2001 From: Krzysztof Jamrog Date: Fri, 30 Aug 2024 13:32:48 +0200 Subject: [PATCH 4/4] AP-5015 added comment about maxRetriesPerRequest value --- src/config/configTypes.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/config/configTypes.ts b/src/config/configTypes.ts index ccb4af8..2da0e9e 100644 --- a/src/config/configTypes.ts +++ b/src/config/configTypes.ts @@ -13,6 +13,10 @@ export type RedisConfig = { password?: string commandTimeout?: number connectTimeout?: number + /** + * Set this option explicitly to null for infinite retries + * By default (for undefined) there are 20 retries, see: https://redis.github.io/ioredis/interfaces/CommonRedisOptions.html#maxRetriesPerRequest + */ maxRetriesPerRequest?: number | null enableReadyCheck?: boolean lazyConnect?: boolean