sunank200 commented on code in PR #53393: URL: https://github.com/apache/airflow/pull/53393#discussion_r2282287705
########## airflow-core/src/airflow/task/weight_rule.py: ########## @@ -21,21 +21,9 @@ import methodtools -# Databases do not support arbitrary precision integers, so we need to limit the range of priority weights. -# postgres: -2147483648 to +2147483647 (see https://www.postgresql.org/docs/current/datatype-numeric.html) -# mysql: -2147483648 to +2147483647 (see https://dev.mysql.com/doc/refman/8.4/en/integer-types.html) -# sqlite: -9223372036854775808 to +9223372036854775807 (see https://sqlite.org/datatype3.html) -DB_SAFE_MINIMUM = -2147483648 -DB_SAFE_MAXIMUM = 2147483647 - - -def db_safe_priority(priority_weight: int) -> int: - """Convert priority weight to a safe value for the database.""" - return max(DB_SAFE_MINIMUM, min(DB_SAFE_MAXIMUM, priority_weight)) - class WeightRule(str, Enum): Review Comment: Good idea. Changed it. -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org