uranusjr commented on code in PR #30231:
URL: https://github.com/apache/airflow/pull/30231#discussion_r1144352359


##########
airflow/providers/google/cloud/sensors/bigquery.py:
##########
@@ -163,6 +165,9 @@ def __init__(
         self.delegate_to = delegate_to
         self.impersonation_chain = impersonation_chain
 
+        self.deferrable = deferrable
+        self.poke_interval = poke_interval

Review Comment:
   BaseSensorOperator already has a `poke_interval` and this would break it. 
Also the `5` default is much too small for traditional sensors, so something 
like this is probably needed:
   
   ```python
   def __init__(self, ..., **kwargs):
       try:
           poke_interval: int = kwargs.pop("poke_internal")
       except KeyError:
           poke_interval = 5 if deferrable else 60
       super().__init__(**kwargs, poke_interval=poke_interval)
   ```
   
   It may be worthwhile to push this logic into BaseSensorOperator somehow.



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

Reply via email to