uranusjr commented on code in PR #69925:
URL: https://github.com/apache/airflow/pull/69925#discussion_r3652300711
##########
providers/standard/src/airflow/providers/standard/sensors/time.py:
##########
@@ -101,10 +105,9 @@ def execute_complete(self, context: Context, event: Any =
None) -> None:
return None
def poke(self, context: Context) -> bool:
- self.log.info("Checking if the time (%s) has come",
self.target_datetime)
-
- # self.target_date has been converted to UTC, so we do not need to
convert timezone
- return timezone.utcnow() > self.target_datetime
+ target_datetime = self.target_datetime
+ self.log.info("Checking if the time (%s) has come", target_datetime)
+ return timezone.utcnow() > target_datetime
Review Comment:
This change doesn’t seem to be meaningful? (Unless it’s doing a race
condition)
I’d revert it.
--
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]