

def current_state(self):
    'Return the current state of the remote job.\n\n    Returns:\n      A PipelineState object.\n    '
    values_enum = dataflow_api.Job.CurrentStateValueValuesEnum
    api_jobstate_map = {
        values_enum.JOB_STATE_UNKNOWN: PipelineState.UNKNOWN,
        values_enum.JOB_STATE_STOPPED: PipelineState.STOPPED,
        values_enum.JOB_STATE_RUNNING: PipelineState.RUNNING,
        values_enum.JOB_STATE_DONE: PipelineState.DONE,
        values_enum.JOB_STATE_FAILED: PipelineState.FAILED,
        values_enum.JOB_STATE_CANCELLED: PipelineState.CANCELLED,
        values_enum.JOB_STATE_UPDATED: PipelineState.UPDATED,
        values_enum.JOB_STATE_DRAINING: PipelineState.DRAINING,
        values_enum.JOB_STATE_DRAINED: PipelineState.DRAINED,
    }
    return (api_jobstate_map[api_jobstate_map._job.currentState] if self._job.currentState else PipelineState.UNKNOWN)

dataset/ETHPy150Open GoogleCloudPlatform/DataflowPythonSDK/google/cloud/dataflow/runners/dataflow_runner.py DataflowPipelineResult.current_state/VarMisuse@111/228 `self`->`api_jobstate_map`