XD-DENG 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_r264009362
 
 

 ##########
 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:
   If it's simple logic & is not going to be re-used for multiple times, I 
don't think it's necessary to have a separate method.

----------------------------------------------------------------
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

Reply via email to