mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Optimize the reopen_files by using FileHandler's method: close & _open
This commit is contained in:
parent
836b078752
commit
e8c65c1414
@ -377,9 +377,8 @@ class Logger(object):
|
||||
handler.acquire()
|
||||
try:
|
||||
if handler.stream:
|
||||
handler.stream.close()
|
||||
handler.stream = open(handler.baseFilename,
|
||||
handler.mode)
|
||||
handler.close()
|
||||
handler.stream = handler._open()
|
||||
finally:
|
||||
handler.release()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user