mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Move api.settings to common.settings (#11036)
### What problem does this PR solve? As title ### Type of change - [x] Refactoring --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@ -20,10 +20,19 @@ import uuid
|
||||
|
||||
import valkey as redis
|
||||
from common.decorator import singleton
|
||||
from common import globals
|
||||
from common import settings
|
||||
from valkey.lock import Lock
|
||||
import trio
|
||||
|
||||
REDIS = {}
|
||||
try:
|
||||
REDIS = settings.decrypt_database_config(name="redis")
|
||||
except Exception:
|
||||
try:
|
||||
REDIS = settings.get_base_config("redis", {})
|
||||
except Exception:
|
||||
REDIS = {}
|
||||
|
||||
class RedisMsg:
|
||||
def __init__(self, consumer, queue_name, group_name, msg_id, message):
|
||||
self.__consumer = consumer
|
||||
@ -61,7 +70,7 @@ class RedisDB:
|
||||
|
||||
def __init__(self):
|
||||
self.REDIS = None
|
||||
self.config = globals.REDIS
|
||||
self.config = REDIS
|
||||
self.__open__()
|
||||
|
||||
def register_scripts(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user