uranusjr commented on code in PR #39724:
URL: https://github.com/apache/airflow/pull/39724#discussion_r1701249829


##########
airflow/decorators/base.py:
##########
@@ -457,6 +457,11 @@ def _expand(self, expand_input: ExpandInput, *, strict: 
bool) -> XComArg:
         end_date = timezone.convert_to_utc(partial_kwargs.pop("end_date", 
None))
         if partial_kwargs.get("pool") is None:
             partial_kwargs["pool"] = Pool.DEFAULT_POOL_NAME
+        if partial_kwargs.get("pool_slots") and partial_kwargs["pool_slots"] < 
1:
+            dag_str = ""
+            if partial_kwargs.get("dag"):
+                dag_str = f" in dag {partial_kwargs['dag'].dag_id}"

Review Comment:
   `dag` is already available in the local scope, why do you need to get it 
from `partial_kwargs`?



##########
airflow/decorators/base.py:
##########
@@ -457,6 +457,11 @@ def _expand(self, expand_input: ExpandInput, *, strict: 
bool) -> XComArg:
         end_date = timezone.convert_to_utc(partial_kwargs.pop("end_date", 
None))
         if partial_kwargs.get("pool") is None:
             partial_kwargs["pool"] = Pool.DEFAULT_POOL_NAME
+        if partial_kwargs.get("pool_slots") and partial_kwargs["pool_slots"] < 
1:

Review Comment:
   Why do you have to get `pool_slots` twice?



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