@cli_utils.action_logging<EOL>def dag_state(args):
dag = get_dag(args)<EOL>dr = DagRun.find(dag.dag_id, execution_date=args.execution_date)<EOL>print(dr[<NUM_LIT:0>].state if len(dr) > <NUM_LIT:0> else None)<EOL>
Returns the state of a DagRun at the command line.
>>> airflow dag_state tutorial 2015-01-01T00:00:00.000000
running