send the raw healthcheck as part of status call

This commit is contained in:
Girish Ramakrishnan
2020-12-02 17:05:16 -08:00
parent b7fed04c12
commit 89c82fb001
+4 -1
View File
@@ -336,7 +336,8 @@ function containerStatus(containerName, tokenEnvName, callback) {
var tmp = {
status: addonDetails.state.Running ? exports.SERVICE_STATUS_ACTIVE : exports.SERVICE_STATUS_STOPPED,
memoryUsed: result.memory_stats.usage,
memoryPercent: parseInt(100 * result.memory_stats.usage / result.memory_stats.limit)
memoryPercent: parseInt(100 * result.memory_stats.usage / result.memory_stats.limit),
healthcheck: response.body
};
callback(null, tmp);
@@ -405,6 +406,7 @@ function getService(id, callback) {
memoryUsed: 0,
memoryPercent: 0,
error: null,
healthcheck: null,
config: {
// If a property is not set then we cannot change it through the api, see below
// memory: 0,
@@ -419,6 +421,7 @@ function getService(id, callback) {
tmp.memoryUsed = result.memoryUsed;
tmp.memoryPercent = result.memoryPercent;
tmp.error = result.error || null;
tmp.healthcheck = result.healthcheck || null;
getServicesConfig(id, function (error, service, servicesConfig) {
if (error) return callback(error);