airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] XD-DENG commented on a change in pull request #4160: [AIRFLOW-3311] Allow pod operator to keep failed pods
Date Tue, 04 Dec 2018 14:51:25 GMT
XD-DENG commented on a change in pull request #4160: [AIRFLOW-3311] Allow pod operator to keep
failed pods
URL: https://github.com/apache/incubator-airflow/pull/4160#discussion_r238693290
 
 

 ##########
 File path: airflow/contrib/operators/kubernetes_pod_operator.py
 ##########
 @@ -123,7 +130,10 @@ def execute(self, context):
                 get_logs=self.get_logs)
 
             if self.is_delete_operator_pod:
-                launcher.delete_pod(pod)
+                if final_state != State.SUCCESS and self.keep_failed_pod:
+                    pass
+                else:
+                    launcher.delete_pod(pod)
 
 Review comment:
   Another very very minor one: would
   ```python
   if not self.keep_failed_pod or final_state == State.SUCCESS:
       launcher.delete_pod(pod)
   ```
   be more concise?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message