redis: fix issue when restoring optional redis
This commit is contained in:
@@ -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}`)
|
||||
|
||||
Reference in New Issue
Block a user