健康检查

This commit is contained in:
heavyrain2012
2021-08-13 16:37:16 +08:00
parent 2f195440cf
commit d43afb282e
6 changed files with 96 additions and 4 deletions
@@ -707,6 +707,14 @@ public class Main {
System.out.println("create channel failure");
System.exit(-1);
}
IMResult<HealthCheckResult> health = GeneralAdmin.healthCheck();
if(health != null && health.getErrorCode() == ErrorCode.ERROR_CODE_SUCCESS) {
System.out.println(health.result);
} else {
System.out.println("health check failure");
System.exit(-1);
}
}
static void testChatroom() throws Exception {