Skip to content

Commit

Permalink
More robust to errors when reading logs which had caused freezes
Browse files Browse the repository at this point in the history
  • Loading branch information
jakep-allenai committed Dec 2, 2024
1 parent d4f3cff commit b3ca86a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pdelfin/beakerpipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,11 @@ async def read_stream(stream):
line = await stream.readline()
if not line:
break
line = line.decode('utf-8').rstrip()
await process_line(line)
try:
line = line.decode('utf-8').rstrip()
await process_line(line)
except Exception as ex:
logger.warning(f"Got {ex} when reading log line from inference server, skipping")

async def timeout_task():
nonlocal last_running_req, last_queue_req, last_semaphore_release
Expand Down

0 comments on commit b3ca86a

Please sign in to comment.