AdamPaslawski commented on a change in pull request #21811:
URL: https://github.com/apache/airflow/pull/21811#discussion_r815491599
##########
File path: airflow/providers/sftp/sensors/sftp.py
##########
@@ -54,4 +63,9 @@ def poke(self, context: 'Context') -> bool:
raise e
return False
self.hook.close_conn()
- return True
+ if self.newer_than:
+ _mod_time = datetime.strptime(mod_time, '%Y%m%d%H%M%S')
+ _newer_than = make_naive(self.newer_than) if not
is_naive(self.newer_than) else self.newer_than
+ return _newer_than <= _mod_time
Review comment:
I agree. Assuming the SFTP site is always on the same time-zone as the
airflow instance is weaker than assuming UTC.
I'll make that change.
--
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]