mirror of
https://github.com/open-webui/open-webui
synced 2025-04-18 21:38:28 +00:00
feat: disable persistent config
This commit is contained in:
parent
63533c9e3a
commit
68aea6bf10
@ -201,6 +201,7 @@ def save_config(config):
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
PERSISTENT_CONFIG_ENABLED = os.environ.get("PERSISTENT_CONFIG_ENABLED", "True").lower() == "true"
|
||||
|
||||
class PersistentConfig(Generic[T]):
|
||||
def __init__(self, env_name: str, config_path: str, env_value: T):
|
||||
@ -208,7 +209,7 @@ class PersistentConfig(Generic[T]):
|
||||
self.config_path = config_path
|
||||
self.env_value = env_value
|
||||
self.config_value = get_config_value(config_path)
|
||||
if self.config_value is not None:
|
||||
if self.config_value is not None and PERSISTENT_CONFIG_ENABLED:
|
||||
log.info(f"'{env_name}' loaded from the latest database entry")
|
||||
self.value = self.config_value
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user