beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From al...@apache.org
Subject [1/2] beam git commit: Use the same termination logic in different places
Date Tue, 29 Aug 2017 00:06:58 GMT
Repository: beam
Updated Branches:
  refs/heads/master bbca4f741 -> 79a594f63


Use the same termination logic in different places


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/16f11326
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/16f11326
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/16f11326

Branch: refs/heads/master
Commit: 16f11326b875cc6598123f17135f3908e0acf0cb
Parents: bbca4f7
Author: Ahmet Altay <altay@google.com>
Authored: Mon Aug 28 13:32:32 2017 -0700
Committer: Ahmet Altay <altay@google.com>
Committed: Mon Aug 28 17:06:44 2017 -0700

----------------------------------------------------------------------
 sdks/python/apache_beam/runners/dataflow/dataflow_runner.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/16f11326/sdks/python/apache_beam/runners/dataflow/dataflow_runner.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/runners/dataflow/dataflow_runner.py b/sdks/python/apache_beam/runners/dataflow/dataflow_runner.py
index 813759e..2b52f78 100644
--- a/sdks/python/apache_beam/runners/dataflow/dataflow_runner.py
+++ b/sdks/python/apache_beam/runners/dataflow/dataflow_runner.py
@@ -949,7 +949,9 @@ class DataflowPipelineResult(PipelineResult):
       while thread.isAlive():
         time.sleep(5.0)
 
-      terminated = self._is_in_terminal_state()
+      # TODO: Merge the termination code in poll_for_job_completion and
+      # _is_in_terminal_state.
+      terminated = (str(self._job.currentState) != 'JOB_STATE_RUNNING')
       assert duration or terminated, (
           'Job did not reach to a terminal state after waiting indefinitely.')
 


Mime
View raw message