diff --git a/creator-node/src/routes/healthCheck.js b/creator-node/src/routes/healthCheck.js index c35a1832de3..6ed971229c8 100644 --- a/creator-node/src/routes/healthCheck.js +++ b/creator-node/src/routes/healthCheck.js @@ -4,7 +4,7 @@ const config = require('../config.js') const versionInfo = require('../../.version.json') const disk = require('diskusage') -const MAX_DB_CONNECTIONS = 90 +const MAX_DB_CONNECTIONS = config.get('dbConnectionPoolMax') const MAX_DISK_USAGE_PERCENT = 90 // 90% module.exports = function (app) { @@ -100,15 +100,16 @@ module.exports = function (app) { const maxUsageBytes = parseInt(req.query.maxUsageBytes) const maxUsagePercent = parseInt(req.query.maxUsagePercent) || MAX_DISK_USAGE_PERCENT - const path = config.get('storagePath') - const { available, total } = await disk.check(path) + const storagePath = config.get('storagePath') + const { available, total } = await disk.check(storagePath) const usagePercent = Math.round((total - available) * 100 / total) const resp = { available: _formatBytes(available), total: _formatBytes(total), usagePercent: `${usagePercent}%`, - maxUsagePercent: `${maxUsagePercent}%` + maxUsagePercent: `${maxUsagePercent}%`, + storagePath } if (maxUsageBytes) { resp.maxUsage = _formatBytes(maxUsageBytes) }