XD-DENG commented on a change in pull request #4675: [AIRFLOW-3853] delete 
local logs after s3 upload
URL: https://github.com/apache/airflow/pull/4675#discussion_r255298621
 
 

 ##########
 File path: airflow/utils/log/s3_task_handler.py
 ##########
 @@ -169,5 +173,7 @@ def s3_write(self, log, remote_log_location, append=True):
                 replace=True,
                 encrypt=configuration.conf.getboolean('core', 
'ENCRYPT_S3_LOGS'),
             )
+            return True
         except Exception:
             self.log.exception('Could not write logs to %s', 
remote_log_location)
+        return False
 
 Review comment:
   I would leave the details of local logs deleting to other folks as I haven't 
touched that part before.
   
   But I do have a question about adding the True/False return statement. Seems 
it's only for the tests' convenience? If that's the case, possibly they're not 
really necessary. Instead, it can be handled in the tests themselves directly.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to