hussein-awala commented on code in PR #29094: URL: https://github.com/apache/airflow/pull/29094#discussion_r1154973687
########## 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: I like the idea of moving the concurrency maps building to `ConcurrencyMap` class, can you review my last commits? -- 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]
