zhongjiajie commented on a change in pull request #4583: [AIRFLOW-3746] Fix to 
prevent missing container exit
URL: https://github.com/apache/airflow/pull/4583#discussion_r255777473
 
 

 ##########
 File path: airflow/operators/docker_operator.py
 ##########
 @@ -228,7 +228,10 @@ def execute(self, context):
             self.cli.start(self.container['Id'])
 
             line = ''
-            for line in self.cli.logs(container=self.container['Id'], 
stream=True):
+            for line in self.cli.attach(container=self.container['Id'],
+                                        stdout=True,
+                                        stderr=True,
+                                        stream=True):
 
 Review comment:
   @ashwiniadiga LGTM

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