mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-08 03:08:02 +00:00
fix: ENABLE_PERSISTENT_CONFIG redis issue
This commit is contained in:
parent
474427c67e
commit
5d48e48e15
1 changed files with 3 additions and 3 deletions
|
|
@ -257,7 +257,7 @@ class AppConfig:
|
|||
self._state[key].value = value
|
||||
self._state[key].save()
|
||||
|
||||
if self._redis:
|
||||
if self._redis and ENABLE_PERSISTENT_CONFIG:
|
||||
redis_key = f"{self._redis_key_prefix}:config:{key}"
|
||||
self._redis.set(redis_key, json.dumps(self._state[key].value))
|
||||
|
||||
|
|
@ -265,8 +265,8 @@ class AppConfig:
|
|||
if key not in self._state:
|
||||
raise AttributeError(f"Config key '{key}' not found")
|
||||
|
||||
# If Redis is available, check for an updated value
|
||||
if self._redis:
|
||||
# If Redis is available and persistent config is enabled, check for an updated value
|
||||
if self._redis and ENABLE_PERSISTENT_CONFIG:
|
||||
redis_key = f"{self._redis_key_prefix}:config:{key}"
|
||||
redis_value = self._redis.get(redis_key)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue