hussein-awala commented on code in PR #29094:
URL: https://github.com/apache/airflow/pull/29094#discussion_r1166193199


##########
airflow/jobs/scheduler_job.py:
##########
@@ -83,6 +84,17 @@
 DM = DagModel
 
 
+@dataclass
+class ConcurrencyMap:
+    """Dataclass to represent concurrency maps"""
+
+    dag_active_tasks_map: DefaultDict[str, int] = 
field(default_factory=lambda: defaultdict(int))
+    task_concurrency_map: DefaultDict[tuple[str, str], int] = 
field(default_factory=lambda: defaultdict(int))
+    task_dagrun_concurrency_map: DefaultDict[tuple[str, str, str], int] = 
field(
+        default_factory=lambda: defaultdict(int)
+    )

Review Comment:
   make sense. I replaced all default dicts by Counters in the module, because 
as you mentioned, it's more suitable.



-- 
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]

Reply via email to