chaimt commented on a change in pull request #4633: AIRFLOW-3791: Dataflow -
Support check status if pipeline spans on multiple jobs
URL: https://github.com/apache/airflow/pull/4633#discussion_r303761668
##########
File path: airflow/contrib/hooks/gcp_dataflow_hook.py
##########
@@ -47,58 +47,131 @@ class DataflowJobStatus:
JOB_STATE_FAILED = "JOB_STATE_FAILED"
JOB_STATE_CANCELLED = "JOB_STATE_CANCELLED"
JOB_STATE_PENDING = "JOB_STATE_PENDING"
+ FAILED_END_STATES = {JOB_STATE_FAILED, JOB_STATE_CANCELLED}
+ SUCCEEDED_END_STATES = {JOB_STATE_DONE}
+ END_STATES = SUCCEEDED_END_STATES | FAILED_END_STATES
class _DataflowJob(LoggingMixin):
def __init__(self, dataflow, project_number, name, location, poll_sleep=10,
- job_id=None, num_retries=None):
+ job_id=None, num_retries=None, multiple_jobs=None):
self._dataflow = dataflow
self._project_number = project_number
self._job_name = name
self._job_location = location
+ self._multiple_jobs = multiple_jobs
Review comment:
this flag means that the dataflow run will create more than one job, and we
need to monitor all to know if it was successful or failure
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services