Skip to content

Commit

Permalink
Force to fetch the actual dag, add more debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tatiana committed Dec 20, 2024
1 parent 430aec3 commit bc98126
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cosmos/listeners/dag_run_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def on_dag_run_success(dag_run: DagRun, msg: str) -> None:

# The following is an airflow.serialization.serialized_objects.SerializedDAG instance
serialized_dag = dag_run.get_dag()
serialized_dag

logger.info(f"dir: {dir(serialized_dag)}")
logger.info(f"1: {serialized_dag.fileloc}")
Expand All @@ -63,7 +62,7 @@ def on_dag_run_success(dag_run: DagRun, msg: str) -> None:

from airflow.models import DagBag

dag_bag = DagBag(dag_folder=dag.fileloc, include_examples=False)
dag_bag = DagBag(dag_folder=serialized_dag.fileloc, include_examples=False)
dag = dag_bag.get_dag(dag_run.dag_id)

if not uses_cosmos(dag):
Expand Down

0 comments on commit bc98126

Please sign in to comment.