zerodarkzone commented on issue #53591:
URL: https://github.com/apache/airflow/issues/53591#issuecomment-3114799677

   > What are the parameters that you're running this for? Do you have an 
example of it not working? Sensors typically rely on the `poke` method, which 
is functional in this implementation.
   > 
   > cc: [@zerodarkzone](https://github.com/zerodarkzone)
   
   The original `TimeSensor` didn't override the execute method. The execute 
method on the base class which is `BaseOperator` in in charge of calling the 
poke method.
   
   This is an extract of the code:
   
   <img width="846" height="792" alt="Image" 
src="https://github.com/user-attachments/assets/acd78f31-9ed5-4ac3-8aa1-a51aa55720a4";
 />
   
   Now the execute method for TimeSensor is useless if you set 
`deferrable=True`.
   
   So basically, this does nothing:
   
   ``` python
   _sensor_wait = TimeSensor(
       task_id="wait_for_2_25",
       target_time=time(2, 25).replace(tzinfo=timezone("America/Bogota")),
       deferrable=False,
   )
   ```
   
   execute is the first method called and the sensor just returns without 
waiting anything.
   


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