Compare commits

...

2 Commits

Author SHA1 Message Date
Anurag Mittal d1e05eb580
exp/exposeCountItems 2020-01-10 19:23:44 +01:00
Anurag Mittal 8ac0beb65b
added countItems to deep healtch for easy access for UI(hack) 2020-01-10 14:22:35 +01:00
1 changed files with 6 additions and 1 deletions

View File

@ -70,6 +70,9 @@ function clientCheck(flightCheckOnStartUp, log, cb) {
if (fail) {
return cb(errors.InternalError, obj);
}
metadata.countItems(log, (err, res) => {
obj.dataManaged = res;
});
return cb(null, obj);
});
}
@ -110,6 +113,8 @@ function checkIP(clientIP) {
*/
function healthcheckHandler(clientIP, req, res, log, statsClient) {
function healthcheckEndHandler(err, results) {
console.log('##################');
console.log('In end handler, results: ', results);
writeResponse(res, err, log, results, error => {
if (error) {
return log.end().warn('healthcheck error', { err: error });