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}`)