From 6830c4fc67875c796ea618b6b80fac0d44a1393e Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Wed, 11 Oct 2023 14:53:25 +0530 Subject: [PATCH] redis: fix issue when restoring optional redis --- src/services.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/services.js b/src/services.js index cfc22d972..cde290295 100644 --- a/src/services.js +++ b/src/services.js @@ -1788,6 +1788,9 @@ async function clearRedis(app, options) { debug('Clearing redis'); + const disabled = app.manifest.addons.redis.optional && !app.enableRedis; + if (disabled) return; + const result = await getContainerDetails('redis-' + app.id, 'CLOUDRON_REDIS_TOKEN'); const [networkError, response] = await safe(superagent.post(`http://${result.ip}:3000/clear?access_token=${result.token}`)