pankajastro commented on code in PR #32041:
URL: https://github.com/apache/airflow/pull/32041#discussion_r1237215659
##########
airflow/cli/commands/dag_command.py:
##########
@@ -145,6 +145,11 @@ def dag_backfill(args, dag: list[DAG] | DAG | None = None)
-> None:
@cli_utils.action_cli
def dag_trigger(args) -> None:
"""Creates a dag run for the specified dag."""
+ dag = DagModel.get_dagmodel(args.dag_id)
+ if not dag:
+ raise SystemExit(f"DAG: {args.dag_id} does not exist in 'dag' table")
+ if dag.is_paused:
+ raise AirflowException(f"DAG with dag_id: {args.dag_id} is paused.")
Review Comment:
it shouldn't. thank you for pointing out.
--
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]