Skip to content

Commit

Permalink
fail early without needing to reduce file_read_timeout (#2180)
Browse files Browse the repository at this point in the history
  • Loading branch information
madhur-ob authored Dec 16, 2024
1 parent 883365d commit ca24277
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions metaflow/runner/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ def read_from_fifo_when_ready(
poll.register(fifo_fd, select.POLLIN)
max_timeout = 3 # Wait for 10 * 3 = 30 ms after last write
while True:
if check_process_exited(command_obj) and command_obj.process.returncode != 0:
raise CalledProcessError(
command_obj.process.returncode, command_obj.command
)

if timeout < 0:
raise TimeoutError("Timeout while waiting for the file content")

Expand Down

0 comments on commit ca24277

Please sign in to comment.