Skip to content

Commit

Permalink
Fix log message for TaskGroups
Browse files Browse the repository at this point in the history
  • Loading branch information
tatiana committed Jun 3, 2024
1 parent fae241b commit 19bd46e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cosmos/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ def __init__(
dbt_vars = project_config.dbt_vars or operator_args.get("vars")

cache_dir = None
cache_identifier = None
if settings.enable_cache:
cache_identifier = cache._create_cache_identifier(dag, task_group)
cache_dir = cache._obtain_cache_dir_path(cache_identifier=cache_identifier)
Expand All @@ -247,7 +248,7 @@ def __init__(
current_time = time.process_time()
elapsed_time = current_time - previous_time
logger.info(
f"Cosmos performance [{platform.node()}|{os.getpid()}]: It took {elapsed_time:.3}s to parse the dbt project for DAG {dag.dag_id} using {self.dbt_graph.load_method}"
f"Cosmos performance [{platform.node()}|{os.getpid()}]: It took {elapsed_time:.3}s to parse the dbt project for DAG {cache_identifier} using {self.dbt_graph.load_method}"
)
previous_time = current_time

Expand Down Expand Up @@ -289,5 +290,5 @@ def __init__(
current_time = time.process_time()
elapsed_time = current_time - previous_time
logger.info(
f"Cosmos performance [{platform.node()}|{os.getpid()}]: It took {elapsed_time:.3}s to build the Airflow DAG {dag.dag_id}."
f"Cosmos performance [{platform.node()}|{os.getpid()}]: It took {elapsed_time:.3}s to build the Airflow DAG {cache_identifier}."
)

0 comments on commit 19bd46e

Please sign in to comment.