refactor(api): tidy leftovers from the api perf pass

Use the service_name local in handle_single_server_cdm, assign service_data once in /api/services, and keep the TERMINAL_STATUSES comment on its constant.
This commit is contained in:
imSp4rky
2026-11-02 15:25:12 -07:00
parent e685710fba
commit 1a590fc6be
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -515,11 +515,11 @@ async def services(request: web.Request) -> web.Response:
services_info = []
for tag in service_tags:
service_data: dict[str, Any] = {**SERVICE_DEFAULTS, "tag": tag}
try:
service_data = {**service_details(tag)}
service_data: dict[str, Any] = {**service_details(tag)}
except Exception as e:
log.warning(f"Could not load details for service {tag}: {e}")
service_data = {**SERVICE_DEFAULTS, "tag": tag}
if tag in services_module.PENDING:
service_data["pending_update"] = True
if server_accounts_allowed(request, tag) and (server_accounts := server_account_regions(tag)) is not None: