mik-laj commented on a change in pull request #4878: [AIRFLOW-4046] Added
validations for poke_interval & timeout for Airflow Sensor
URL: https://github.com/apache/airflow/pull/4878#discussion_r264009059
##########
File path: airflow/sensors/base_sensor_operator.py
##########
@@ -70,6 +70,12 @@ def __init__(self,
*args,
**kwargs):
super(BaseSensorOperator, self).__init__(*args, **kwargs)
+ if not isinstance(poke_interval, (int, float)) or poke_interval < 0:
Review comment:
Do you think it's worth move it to a separate method?Operators for GCP have
validation in a separate method.
Reference:
https://github.com/apache/airflow/blob/master/airflow/contrib/operators/gcp_sql_operator.py#L166-L170
----------------------------------------------------------------
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]
With regards,
Apache Git Services