@onlineapps/service-wrapper 2.1.115 → 2.1.116
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ServiceWrapper.js +13 -8
package/package.json
CHANGED
package/src/ServiceWrapper.js
CHANGED
|
@@ -1092,15 +1092,20 @@ class ServiceWrapper {
|
|
|
1092
1092
|
};
|
|
1093
1093
|
|
|
1094
1094
|
if (this.mqClient) {
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
health.
|
|
1095
|
+
const transport = this.mqClient._transport;
|
|
1096
|
+
if (transport && typeof transport.performHealthCheck === 'function') {
|
|
1097
|
+
try {
|
|
1098
|
+
const mqHealth = await transport.performHealthCheck();
|
|
1099
|
+
health.components.mq = mqHealth.healthy ? 'healthy' : 'unhealthy';
|
|
1100
|
+
if (!mqHealth.healthy) {
|
|
1101
|
+
health.mqIssues = mqHealth.issues;
|
|
1102
|
+
}
|
|
1103
|
+
} catch (e) {
|
|
1104
|
+
health.components.mq = 'unhealthy';
|
|
1105
|
+
health.mqIssues = [e.message];
|
|
1100
1106
|
}
|
|
1101
|
-
}
|
|
1102
|
-
health.components.mq = 'unhealthy';
|
|
1103
|
-
health.mqIssues = [e.message];
|
|
1107
|
+
} else {
|
|
1108
|
+
health.components.mq = this.mqClient.isConnected() ? 'healthy' : 'unhealthy';
|
|
1104
1109
|
}
|
|
1105
1110
|
}
|
|
1106
1111
|
|