jedcunningham commented on a change in pull request #16765:
URL: https://github.com/apache/airflow/pull/16765#discussion_r662638617
##########
File path: airflow/models/baseoperator.py
##########
@@ -590,10 +590,16 @@ def __init__(
if isinstance(max_retry_delay, timedelta):
self.max_retry_delay = max_retry_delay
else:
- self.log.debug("Max_retry_delay isn't timedelta object,
assuming secs")
+ self.log.debug("max_retry_delay isn't timedelta object,
assuming secs")
self.max_retry_delay = timedelta(seconds=max_retry_delay)
self.params = params or {} # Available in templates!
+ if priority_weight:
+ if not isinstance(priority_weight, int):
+ raise AirflowException(
+ f"`priority_weight` for task: '{self.task_id}' only
accepts integers, "
+ f"{type(priority_weight)} provided: {priority_weight}."
Review comment:
```suggestion
f"`priority_weight` for task '{self.task_id}' only
accepts integers, "
f"received '{type(priority_weight)}'."
```
--
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]