AdamPaslawski commented on a change in pull request #21811:
URL: https://github.com/apache/airflow/pull/21811#discussion_r814745208
##########
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 decided to assume a naive comparison and allow the sensor to be
configured with an offset aware or unaware newer_than parameter, thoughts on
this @eladkal ?
--
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]