Use cached domain reachability only in api_services health

Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/3212805f-2cc0-4576-8cda-c3c303f0de47

Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-15 18:34:18 +00:00
committed by GitHub
parent 8a57734a42
commit 31c7b796f8

View File

@@ -2409,17 +2409,7 @@ async def api_services():
if ps == "closed": if ps == "closed":
has_port_issues = True has_port_issues = True
break break
has_domain_issues = False has_domain_issues = bool(needs_domain and domain and cached_reachable is False)
if needs_domain:
has_domain_issues = await loop.run_in_executor(
None,
_check_domain_health_fast,
domain,
_cached_external_ip,
)
if not has_domain_issues and domain:
if cached_reachable is False:
has_domain_issues = True
if has_port_issues or has_domain_issues: if has_port_issues or has_domain_issues:
health = "needs_attention" health = "needs_attention"
else: else:
@@ -2440,17 +2430,7 @@ async def api_services():
# For enabled services that are inactive (e.g. socket-activated PHP-FPM), # For enabled services that are inactive (e.g. socket-activated PHP-FPM),
# still check domain/port health so status remains consistent with # still check domain/port health so status remains consistent with
# other domain services when there are actionable issues. # other domain services when there are actionable issues.
has_domain_issues = False has_domain_issues = bool(needs_domain and domain and cached_reachable is False)
if needs_domain:
has_domain_issues = await loop.run_in_executor(
None,
_check_domain_health_fast,
domain,
_cached_external_ip,
)
if not has_domain_issues and domain:
if cached_reachable is False:
has_domain_issues = True
has_port_issues = False has_port_issues = False
if port_requirements: if port_requirements:
for p in port_requirements: for p in port_requirements: