Skip to content

Commit

Permalink
fix: finish reading frontend error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
MSchmoecker committed Nov 26, 2024
1 parent 67784f5 commit 3104380
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions controller/thymis_controller/routers/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,12 @@ async def run(self):

# read stdout and stderr in background
async def read_stream(stream: asyncio.StreamReader, level=logging.INFO):
while self.process.returncode is None and not self.stopped:
while not stream.at_eof():
line = await stream.readline()
if line:
logger.log(
level, "frontend process: %s", line.decode("utf-8").strip()
)
await asyncio.sleep(0.001)

# start threads
asyncio.create_task(read_stream(self.process.stdout))
Expand Down

0 comments on commit 3104380

Please sign in to comment.