Refine inactive branch variable naming in services health logic

Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/0baad662-d798-4d3e-a079-eefece637ab7

Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-15 17:10:45 +00:00
committed by GitHub
parent 1651f8de37
commit 2073303b18

View File

@@ -2424,19 +2424,19 @@ 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_inactive = False has_domain_issues = False
if needs_domain: if needs_domain:
has_domain_issues_inactive = await loop.run_in_executor( has_domain_issues = await loop.run_in_executor(
None, None,
_check_domain_health_fast, _check_domain_health_fast,
domain, domain,
_cached_external_ip, _cached_external_ip,
) )
if not has_domain_issues_inactive and domain: if not has_domain_issues and domain:
cached_reachable = _is_domain_reachable_cached(domain) cached_reachable = _is_domain_reachable_cached(domain)
if cached_reachable is False: if cached_reachable is False:
has_domain_issues_inactive = True has_domain_issues = True
has_port_issues_inactive = False has_port_issues = False
if port_requirements: if port_requirements:
for p in port_requirements: for p in port_requirements:
ps = _check_port_status( ps = _check_port_status(
@@ -2446,9 +2446,9 @@ async def api_services():
firewall_ports, firewall_ports,
) )
if ps == "closed": if ps == "closed":
has_port_issues_inactive = True has_port_issues = True
break break
if has_domain_issues_inactive or has_port_issues_inactive: if has_domain_issues or has_port_issues:
health = "needs_attention" health = "needs_attention"
else: else:
health = "inactive" health = "inactive"