Commit b8c7357f authored by Girish Ramakrishnan's avatar Girish Ramakrishnan

redis: if container inactive, return stopped status

parent 819f8e33
......@@ -314,7 +314,7 @@ function containerStatus(containerName, tokenEnvName, callback) {
assert.strictEqual(typeof callback, 'function');
getContainerDetails(containerName, tokenEnvName, function (error, addonDetails) {
if (error && error.reason === BoxError.NOT_FOUND) return callback(null, { status: exports.SERVICE_STATUS_STOPPED });
if (error && (error.reason === BoxError.NOT_FOUND || error.reason === BoxError.INACTIVE)) return callback(null, { status: exports.SERVICE_STATUS_STOPPED });
if (error) return callback(error);
request.get(`https://${addonDetails.ip}:3000/healthcheck?access_token=${addonDetails.token}`, { json: true, rejectUnauthorized: false }, function (error, response) {
......@@ -603,7 +603,7 @@ function waitForContainer(containerName, tokenEnvName, callback) {
debug(`Waiting for ${containerName}`);
getContainerDetails(containerName, tokenEnvName, function (error, result) {
if (error) return callback(error);
if (error) return callback(error);
async.retry({ times: 10, interval: 15000 }, function (retryCallback) {
request.get(`https://${result.ip}:3000/healthcheck?access_token=${result.token}`, { json: true, rejectUnauthorized: false }, function (error, response) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment