You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/04/07 02:26:34 UTC

[GitHub] [airflow] CelastrinaLadon commented on a change in pull request #15134: add loggin.info when poke in SFTP,FTP and Filesystem sensor to show last modified

CelastrinaLadon commented on a change in pull request #15134:
URL: https://github.com/apache/airflow/pull/15134#discussion_r608296756



##########
File path: airflow/sensors/filesystem.py
##########
@@ -57,6 +58,9 @@ def poke(self, context):
 
         for path in glob(full_path):
             if os.path.isfile(path):
+                mod_time = os.path.getmtime(path)
+                mod_time = datetime.datetime.fromtimestamp(mod_time).strftime('%Y%m%d%H%M%S')

Review comment:
       but in SFTP and FTP i using get_mod_time function it's return string format date like this `.strftime('%Y%m%d%H%M%S')`
   
   if you want to readable we should be change shall we change get_mod_time too ?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org