samuelwbock commented on a change in pull request #4675: [AIRFLOW-3853] Default 
to delete local logs after remote upload
URL: https://github.com/apache/airflow/pull/4675#discussion_r259958453
 
 

 ##########
 File path: airflow/utils/log/s3_task_handler.py
 ##########
 @@ -84,7 +85,10 @@ def close(self):
             # read log and remove old logs to get just the latest additions
             with open(local_loc, 'r') as logfile:
                 log = logfile.read()
-            self.s3_write(log, remote_loc)
+            successfully_written = self.s3_write(log, remote_loc)
+            # If the file was written out, remove it to avoid duplicating logs 
in S3
+            if successfully_written:
 
 Review comment:
   Hey friends, changes made. Any other changes desired?

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