From 9a4a39c71b4e46c2aa7243fca7b57aa5f9450713 Mon Sep 17 00:00:00 2001 From: Lucas Armand Date: Mon, 17 Nov 2025 10:32:38 -0800 Subject: [PATCH] Read model log --- lib/backend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/backend.py b/lib/backend.py index 19764bd..e8ac112 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -417,7 +417,7 @@ class Backend: async def tail_log(): log.debug(f"tailing file: {self.model_log_file}") - async with await open_file(self.model_log_file, encoding='utf-8', errors='ignore') as f: + async with await open_file(self.model_log_file, mode="r", encoding='utf-8', errors='ignore') as f: while True: line = await f.readline() if line: @@ -431,4 +431,4 @@ class Backend: if os.path.isfile(self.model_log_file) is True: return await tail_log() else: - await sleep(1) + await asyncio.sleep(1)