Skip to content

Commit

Permalink
Changing to async produces a timeout error instead of stuck in infini…
Browse files Browse the repository at this point in the history
…te loop.
  • Loading branch information
alxmrs committed Sep 21, 2022
1 parent 41623ec commit 676d752
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdks/python/apache_beam/runners/dask/dask_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,13 @@ def wait_until_finish(self, duration=None) -> PipelineState:
# Convert milliseconds to seconds
duration /= 1000
self.client.wait_for_workers(timeout=duration)
self.client.gather(self.futures, errors='raise')
self.client.gather(self.futures, errors='raise', asynchronous=True)
self._state = PipelineState.DONE
except: # pylint: disable=broad-except
self._state = PipelineState.FAILED
raise
# finally:
# self.client.close(timeout=duration)
return self._state

def cancel(self) -> PipelineState:
Expand Down

0 comments on commit 676d752

Please sign in to comment.