[model-gateway] Add PostgreSQL support to binding (#13766)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Simo Lin <linsimo.mark@gmail.com> Co-authored-by: Chang Su <chang.s.su@oracle.com>
This commit is contained in:
co-authored by
gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Simo Lin
Chang Su
parent
9dab534b35
commit
5e70880e64
@@ -210,6 +210,8 @@ class Router:
|
||||
"oracle_pool_min",
|
||||
"oracle_pool_max",
|
||||
"oracle_pool_timeout_secs",
|
||||
"postgres_db_url",
|
||||
"postgres_pool_max",
|
||||
]
|
||||
for field in fields_to_remove:
|
||||
args_dict.pop(field, None)
|
||||
|
||||
@@ -109,6 +109,8 @@ class RouterArgs:
|
||||
oracle_pool_min: int = 1
|
||||
oracle_pool_max: int = 16
|
||||
oracle_pool_timeout_secs: int = 30
|
||||
postgres_db_url: Optional[str] = None
|
||||
postgres_pool_max: int = 16
|
||||
# mTLS configuration for worker communication
|
||||
client_cert_path: Optional[str] = None
|
||||
client_key_path: Optional[str] = None
|
||||
@@ -598,6 +600,19 @@ class RouterArgs:
|
||||
),
|
||||
help="Oracle connection pool timeout in seconds (default: 30, env: ATP_POOL_TIMEOUT_SECS)",
|
||||
)
|
||||
# Postgres configuration
|
||||
parser.add_argument(
|
||||
f"--{prefix}postgres-db-url",
|
||||
type=str,
|
||||
default=os.getenv("POSTGRES_DB_URL"),
|
||||
help="PostgreSQL database connection URL (env: POSTGRES_DB_URL)",
|
||||
)
|
||||
parser.add_argument(
|
||||
f"--{prefix}postgres-pool-max",
|
||||
type=int,
|
||||
default=int(os.getenv("POSTGRES_POOL_MAX", RouterArgs.postgres_pool_max)),
|
||||
help="Maximum PostgreSQL connection pool size (default: 16, env: POSTGRES_POOL_MAX)",
|
||||
)
|
||||
# mTLS configuration
|
||||
parser.add_argument(
|
||||
f"--{prefix}client-cert-path",
|
||||
|
||||
Reference in New Issue
Block a user