From f4271ba4d92476f0a29ee95e74944558b97aeea2 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 1 Aug 2023 18:09:01 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(settings.py):=20add=20debu?= =?UTF-8?q?g=20logs=20to=20track=20the=20behavior=20of=20components=5Fpath?= =?UTF-8?q?=20configuration=20=E2=9C=A8=20feat(settings.py):=20add=20suppo?= =?UTF-8?q?rt=20for=20LANGFLOW=5FCOMPONENTS=5FPATH=20environment=20variabl?= =?UTF-8?q?e=20to=20add=20custom=20components=20path=20to=20components=5Fp?= =?UTF-8?q?ath?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/settings.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/backend/langflow/settings.py b/src/backend/langflow/settings.py index e9c62d6f7..08400a811 100644 --- a/src/backend/langflow/settings.py +++ b/src/backend/langflow/settings.py @@ -47,16 +47,20 @@ class Settings(BaseSettings): if not values.get("components_path"): values["components_path"] = [BASE_COMPONENTS_PATH] + logger.debug("No components_path provided, using default components path") elif BASE_COMPONENTS_PATH not in values["components_path"]: values["components_path"].append(BASE_COMPONENTS_PATH) + logger.debug("Adding default components path to components_path") - if os.getenv("LANGFLOW_COMPONENT_PATH"): - langflow_component_path = Path(os.getenv("LANGFLOW_COMPONENT_PATH")) + if os.getenv("LANGFLOW_COMPONENTS_PATH"): + logger.debug("Adding LANGFLOW_COMPONENTS_PATH to components_path") + langflow_component_path = Path(os.getenv("LANGFLOW_COMPONENTS_PATH")) if ( langflow_component_path.exists() and langflow_component_path not in values["components_path"] ): values["components_path"].append(langflow_component_path) + logger.debug(f"Adding {langflow_component_path} to components_path") return values class Config: