refactor: simplify Oracle pool to use only ORACLE_SERVERS format

- Remove legacy pool support (DSN, env vars fallback)
- Use first registered server when server_id not specified
- Show server dropdown even with single server in ORACLE_SERVERS
- Email login only available for 2+ servers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-02-03 15:15:57 +00:00
parent 6718c956f7
commit 2e1ead69e1
2 changed files with 26 additions and 99 deletions

View File

@@ -59,14 +59,15 @@ def create_system_router() -> APIRouter:
servers = settings.get_oracle_servers()
# Multi-server mode: 2+ servers configured via ORACLE_SERVERS
if servers and len(servers) > 1:
# Multi-server mode: ANY servers configured via ORACLE_SERVERS
# Shows server dropdown even with 1 server (explicit server selection)
if servers and len(servers) >= 1:
return AuthModeResponse(
mode="multi-server",
supports_email_login=True
supports_email_login=len(servers) > 1 # Email lookup only for 2+ servers
)
# Single-server mode: legacy config or single ORACLE_SERVERS entry
# Single-server mode: legacy config (no ORACLE_SERVERS, uses env vars)
return AuthModeResponse(
mode="single-server",
supports_email_login=False