potiuk commented on a change in pull request #20438:
URL: https://github.com/apache/airflow/pull/20438#discussion_r775563883
##########
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:
Should we turn the max_pending time into an optional parameter? That
would make it a bit more powerful - alowing to cleanup just started Pending
PODs.
--
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]