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:
Jin Hai
2025-11-06 09:36:38 +08:00
committed by GitHub
parent 87c9a054d3
commit f98b24c9bf
68 changed files with 675 additions and 718 deletions

View File

@ -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: