redis: fix issue when restoring optional redis

This commit is contained in:
Girish Ramakrishnan
2023-10-11 14:53:25 +05:30
parent 2f3fba346f
commit 6830c4fc67

View File

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