jrmccluskey commented on code in PR #37639:
URL: https://github.com/apache/beam/pull/37639#discussion_r2990258655


##########
sdks/python/apache_beam/runners/dataflow/dataflow_runner.py:
##########
@@ -149,29 +155,28 @@ def rank_error(msg):
     while True:
       response = runner.dataflow_client.get_job(job_id)
       # If get() is called very soon after Create() the response may not 
contain
-      # an initialized 'currentState' field.
-      if response.currentState is not None:
-        if response.currentState != last_job_state:
+      # an initialized 'current_state' field.
+      if response.current_state is not None:
+        current_state = response.current_state.name
+        if current_state != last_job_state:
           if state_update_callback:
-            state_update_callback(response.currentState)
-          _LOGGER.info('Job %s is in state %s', job_id, response.currentState)
-          last_job_state = response.currentState
-        if str(response.currentState) not in ('JOB_STATE_RUNNING',
-                                              'JOB_STATE_PAUSED',
-                                              'JOB_STATE_PAUSING'):
+            state_update_callback(current_state)
+          _LOGGER.info('Job %s is in state %s', job_id, current_state)
+          last_job_state = current_state
+        if str(current_state) not in ('JOB_STATE_RUNNING'):

Review Comment:
   same thing, this client doesn't have that concept yet



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to