mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-04-24 20:55:36 +08:00
## Summary - Replace `json.load(open(...))` with `with open(...) as f: json.load(f)` in 2 resume parser files - Fixes 4 leaked file descriptors in `corporations.py` (3) and `schools.py` (1) ## Why In a long-running server process like RAGFlow, leaked file handles can accumulate and hit the OS file descriptor limit (`OSError: [Errno 24] Too many open files`). The other instances mentioned in the issue (`infinity_conn_base.py` and `init_data.py`) have already been fixed. ## Test plan - [x] Verified affected files use `with` statement after fix - [x] Grep confirms no remaining `json.load(open(` patterns in codebase Fixes #13996 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>