potiuk commented on a change in pull request #20438:
URL: https://github.com/apache/airflow/pull/20438#discussion_r775939000



##########
File path: airflow/cli/commands/kubernetes_command.py
##########
@@ -108,11 +113,15 @@ def cleanup_pods(args):
             pod_phase = pod.status.phase.lower()
             pod_reason = pod.status.reason.lower() if pod.status.reason else ''
             pod_restart_policy = pod.spec.restart_policy.lower()
+            current_time = datetime.now(pod.metadata.creation_timestamp.tzinfo)
+            # set time limit to 30m for pending pods
+            max_pending_time = timedelta(minutes=30)

Review comment:
       Agree. But the 30 m is kinda arbitrary. And if you know it's safe, 
cleaning pods that are there for 10 minutes when you experienced some 
problematic case and want to clean-up might be useful I believe (especially if 
your 3 hours long meeting start in 5 minutes and you cannot wait ;) .




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to