🔧 chore(settings.py): update environment variable prefix from "LANGFLOW_" to "langflow_" for consistency

The environment variable prefix used in the settings.py file has been updated from "LANGFLOW_" to "langflow_" to maintain consistency with the naming conventions used in the project. This change ensures that all environment variables related to the Langflow backend have a consistent prefix.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-07-02 16:20:17 -03:00
commit 35e0ea9d80

View file

@ -29,8 +29,8 @@ class Settings(BaseSettings):
def set_database_url(cls, values):
if "database_url" not in values:
logger.debug("No database_url provided, trying DATABASE_URL env variable")
if database_url := os.getenv("DATABASE_URL"):
values["database_url"] = database_url
if langflow_database_url := os.getenv("langflow_database_url"):
values["database_url"] = langflow_database_url
else:
logger.debug("No DATABASE_URL env variable, using sqlite database")
values["database_url"] = "sqlite:///./langflow.db"
@ -39,7 +39,7 @@ class Settings(BaseSettings):
class Config:
validate_assignment = True
extra = "ignore"
env_prefix = "LANGFLOW_"
env_prefix = "langflow_"
@root_validator(allow_reuse=True)
def validate_lists(cls, values):