karenbraganz commented on code in PR #39724:
URL: https://github.com/apache/airflow/pull/39724#discussion_r1704146463
##########
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:
I have pool_slots twice because I wanted to make sure pool_slots existed
before comparing it to an integer in order to avoid a TypeError. I can make it
less verbose in my next commit with `if partial_kwargs.get("pool_slots", 1) <
1:`. In this way I only call it once and if it doesn't exist, it returns 1
instead of None so a TypeError is avoided and the condition is also not met.
--
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]