From 31bfa69c166d5256d3a55b4adb055c4b5f34efb4 Mon Sep 17 00:00:00 2001 From: Wyatt Pearsall Date: Tue, 30 Jun 2026 10:22:03 -0700 Subject: [PATCH] Use pool_maxsize envvar if present --- complaint_search/es_interface.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/complaint_search/es_interface.py b/complaint_search/es_interface.py index 8649cd6..4daf40c 100644 --- a/complaint_search/es_interface.py +++ b/complaint_search/es_interface.py @@ -33,6 +33,7 @@ _ES_URL = f"http://{_ES_HOST}:{_ES_PORT}" _ES_USER = os.environ.get("ES_USER", "") _ES_PASSWORD = os.environ.get("ES_PASSWORD", "") +_ES_POOL = int(os.getenv("ES_POOL_MAXSIZE", 1)) _ES_INSTANCE = None _COMPLAINT_ES_INDEX = os.environ.get("COMPLAINT_ES_INDEX", "complaint-index") @@ -148,7 +149,7 @@ def _get_es(): f"http://{host}:{_ES_PORT}", use_ssl=(str(_ES_PORT) == "443"), timeout=100, - pool_maxsize=10 + pool_maxsize=_ES_POOL ) return _ES_INSTANCE