Read model log

This commit is contained in:
Lucas Armand
2025-11-17 10:32:38 -08:00
parent a4339bd3f1
commit 9a4a39c71b
+2 -2
View File
@@ -417,7 +417,7 @@ class Backend:
async def tail_log(): async def tail_log():
log.debug(f"tailing file: {self.model_log_file}") 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: while True:
line = await f.readline() line = await f.readline()
if line: if line:
@@ -431,4 +431,4 @@ class Backend:
if os.path.isfile(self.model_log_file) is True: if os.path.isfile(self.model_log_file) is True:
return await tail_log() return await tail_log()
else: else:
await sleep(1) await asyncio.sleep(1)