Skip to content

Commit

Permalink
improve logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tatiana committed Dec 20, 2024
1 parent a1d63ee commit 7ef47f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cosmos/listeners/dag_run_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class EventStatus:


def is_cosmos_dag(dag: DAG) -> bool:
logger.info("is_cosmos_dag: {dag.__class__.__module__}")
logger.info(f"is_cosmos_dag: {dag.__class__.__module__}")
if dag.__class__.__module__.startswith("cosmos."):
return True
return False
Expand All @@ -28,7 +28,7 @@ def is_cosmos_dag(dag: DAG) -> bool:
def total_cosmos_task_groups(dag: DAG) -> int:
cosmos_task_groups = 0
for group_id, task_group in dag.task_group_dict.items():
logger.info("total_cosmos_task_groups: {task_group.__class__}")
logger.info(f"total_cosmos_task_groups: {task_group.__class__.__module__}")
if task_group.__class__.__module__.startswith("cosmos."):
cosmos_task_groups += 1
return cosmos_task_groups
Expand All @@ -37,7 +37,7 @@ def total_cosmos_task_groups(dag: DAG) -> int:
def total_cosmos_tasks(dag: DAG) -> int:
cosmos_tasks = 0
for task in dag.tasks:
logger.info("total_cosmos_task_groups: {task.__class__.__module__}")
logger.info(f"total_cosmos_task_groups: {task.__class__.__module__}")
if task.__class__.__module__.startswith("cosmos."):
cosmos_tasks += 1
return cosmos_tasks
Expand Down

0 comments on commit 7ef47f5

Please sign in to comment.