Refactor storage implementations to support both single and multi-process modes
• Add shared storage management module • Support process/thread lock based on mode
This commit is contained in:
@@ -266,13 +266,7 @@ class LightRAG:
|
||||
|
||||
_storages_status: StoragesStatus = field(default=StoragesStatus.NOT_CREATED)
|
||||
|
||||
def __post_init__(self):
|
||||
# Initialize manager if needed
|
||||
from lightrag.api.utils_api import manager, initialize_manager
|
||||
if manager is None:
|
||||
initialize_manager()
|
||||
logger.info("Initialized manager for single process mode")
|
||||
|
||||
def __post_init__(self):
|
||||
os.makedirs(os.path.dirname(self.log_file_path), exist_ok=True)
|
||||
set_logger(self.log_file_path, self.log_level)
|
||||
logger.info(f"Logger initialized for working directory: {self.working_dir}")
|
||||
|
Reference in New Issue
Block a user