uranusjr commented on a change in pull request #20900:
URL: https://github.com/apache/airflow/pull/20900#discussion_r786650603



##########
File path: airflow/api_connexion/schemas/dag_schema.py
##########
@@ -79,7 +79,7 @@ class DAGDetailSchema(DAGSchema):
     timezone = TimezoneField()
     catchup = fields.Boolean()
     orientation = fields.String()
-    concurrency = fields.Integer()  # TODO: Remove in Airflow 3.0
+    concurrency = fields.Method("get_concurrency")  # TODO: Remove in Airflow 
3.0

Review comment:
       Oh… no, I meant if we use `concurrency = 
fields.Integer("max_active_tasks")` it’ll error. The `max_active_runs` below is 
a typo 🤦 

##########
File path: airflow/api_connexion/schemas/dag_schema.py
##########
@@ -90,6 +90,10 @@ class DAGDetailSchema(DAGSchema):
     is_paused = fields.Method("get_is_paused", dump_only=True)
     is_active = fields.Method("get_is_active", dump_only=True)
 
+    @staticmethod
+    def get_concurrency(obj: DAG):
+        return obj.max_active_runs

Review comment:
       ```suggestion
           return obj.max_active_tasks
   ```




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