zerodarkzone commented on issue #53591:
URL: https://github.com/apache/airflow/issues/53591#issuecomment-3114825007
This should be fixed just by doing something like this:
``` python
class TimeSensor(BaseSensorOperator):
...
def execute(self, context: Context) -> None:
if self.deferrable:
self.defer(
trigger=DateTimeTrigger(
moment=self.target_datetime, # This needs to be an
aware timestamp
end_from_trigger=self.end_from_trigger,
),
method_name="execute_complete",
)
else:
super().execute(context)
```
--
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]