防止 flush 失败影响日志获取
This commit is contained in:
parent
b41783b9c8
commit
e6033c712b
@ -103,8 +103,11 @@ async def connect_room(room_id):
|
|||||||
def flush_files():
|
def flush_files():
|
||||||
room_status_log.flush()
|
room_status_log.flush()
|
||||||
|
|
||||||
for room_id in log_files:
|
try:
|
||||||
log_files[room_id].flush()
|
for room_id in log_files:
|
||||||
|
log_files[room_id].flush()
|
||||||
|
except Exception as e:
|
||||||
|
logger.exception(f"flush_files failed with {e}")
|
||||||
|
|
||||||
timer = threading.Timer(1, flush_files)
|
timer = threading.Timer(1, flush_files)
|
||||||
timer.daemon = True
|
timer.daemon = True
|
||||||
|
Loading…
Reference in New Issue
Block a user