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()
|
handler.acquire()
|
||||||
try:
|
try:
|
||||||
if handler.stream:
|
if handler.stream:
|
||||||
handler.stream.close()
|
handler.close()
|
||||||
handler.stream = open(handler.baseFilename,
|
handler.stream = handler._open()
|
||||||
handler.mode)
|
|
||||||
finally:
|
finally:
|
||||||
handler.release()
|
handler.release()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user