ashb commented on a change in pull request #15247:
URL: https://github.com/apache/airflow/pull/15247#discussion_r640686927
##########
File path: airflow/models/pool.py
##########
@@ -106,6 +107,8 @@ def slots_stats(
pool_rows: Iterable[Tuple[str, int]] = query.all()
for (pool_name, total_slots) in pool_rows:
+ if total_slots == -1:
+ total_slots = maxsize
Review comment:
The one downside to this is that it would then be logged as
`9223372036854775807 slots free` etc.
It breaks/is lying about the type, but how about:
```suggestion
total_slots = float('inf') # type: ignore
```
Because this has all the properties we want:
- Anything subtracted from it is still infinity
- It is greater than any actual number.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]