(health_ok: bool, health_detail: str, listener: ListenerInfo | None)
| 415 | |
| 416 | |
| 417 | def describe_service(health_ok: bool, health_detail: str, listener: ListenerInfo | None) -> str: |
| 418 | listener_text = describe_listener(listener) |
| 419 | if health_ok: |
| 420 | return f"{listener_text} | {health_detail}" if listener else health_detail |
| 421 | if listener: |
| 422 | return f"{listener_text} | 健康检查未通过:{health_detail}" |
| 423 | return health_detail |
| 424 | |
| 425 | |
| 426 | def normalize_remote_health_detail(detail: str) -> str: |
no test coverage detected