fix: stabilize logging and RabbitMQ shutdown lifecycle#2117
Conversation
🤖 Open Code ReviewTarget: PR #2117 🔍 OpenCodeReview found 2 issue(s) in this PR. 1.
|
Avoid re-running dictConfig on every get_logger call, since repeated configuration can close and replace active handlers while background threads are emitting records. Keep logging configuration process-local and reconfigure only after a PID change.
Use FastAPI lifespan cleanup to stop scheduler and RabbitMQ resources before logging handlers are torn down during worker or pod shutdown.
✅ Automated Test Results: PASSEDAll tests passed (7/7 executed). memos_python_core/changed-repo-python: 7/7. Duration: 5s [advisory, non-gating] AI-generated tests on branch test/auto-gen-36fc19a11812f091-20260716211740: 103/106 passed, 1 failed — these do NOT affect the PR verdict; review the branch manually. Branch: |
Description
fix: configure logging once per process
fix: close scheduler resources on API shutdown
Type of change
How Has This Been Tested?
Checklist
Reviewer Checklist