mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-01 16:36:06 +00:00
fix(logging): the web workers rotate the panel's log without losing lines
Every gunicorn worker had its own RotatingFileHandler on the panel's log. Once one rotated it, the others went on writing into the renamed file and rotated again in turn: the log then held the lines of one worker, and the others' went into the old files and were deleted with them. The handler is now concurrent-log-handler's, which rotates under a lock file and reopens the log after another process rotated it. That handler keeps no file open, so socketiod's copy of its stderr can be fd 3, the number a serial console worker logs to: dup2 onto itself kept it close-on-exec and the worker failed to start. It is made inheritable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea
This commit is contained in:
parent
30da02e25e
commit
db1db4cb32
5 changed files with 32 additions and 3 deletions
|
|
@ -6,6 +6,8 @@ django-otp==1.7.5
|
|||
idna>=3.15
|
||||
requests>=2.33.0
|
||||
urllib3>=2.8.0
|
||||
# the panel's processes rotate one log file without losing each other's lines
|
||||
concurrent-log-handler==0.9.31
|
||||
django-axes==8.3.1
|
||||
djangorestframework==3.18.3
|
||||
django-rest-knox==5.1.1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue