mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Optimize graphrag again (#6513)
### What problem does this PR solve? Removed set_entity and set_relation to avoid accessing doc engine during graph computation. Introduced GraphChange to avoid writing unchanged chunks. ### Type of change - [x] Performance Improvement
This commit is contained in:
@ -47,6 +47,8 @@ from rag.utils.redis_conn import RedisDistributedLock
|
||||
|
||||
stop_event = threading.Event()
|
||||
|
||||
RAGFLOW_DEBUGPY_LISTEN = int(os.environ.get('RAGFLOW_DEBUGPY_LISTEN', "0"))
|
||||
|
||||
def update_progress():
|
||||
lock_value = str(uuid.uuid4())
|
||||
redis_lock = RedisDistributedLock("update_progress", lock_value=lock_value, timeout=60)
|
||||
@ -85,6 +87,11 @@ if __name__ == '__main__':
|
||||
settings.init_settings()
|
||||
print_rag_settings()
|
||||
|
||||
if RAGFLOW_DEBUGPY_LISTEN > 0:
|
||||
logging.info(f"debugpy listen on {RAGFLOW_DEBUGPY_LISTEN}")
|
||||
import debugpy
|
||||
debugpy.listen(("0.0.0.0", RAGFLOW_DEBUGPY_LISTEN))
|
||||
|
||||
# init db
|
||||
init_web_db()
|
||||
init_web_data()
|
||||
|
||||
Reference in New Issue
Block a user