You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Lee-W (via GitHub)" <gi...@apache.org> on 2023/09/01 00:16:06 UTC
[GitHub] [airflow] Lee-W commented on a diff in pull request #33977: Move the try outside the loop when this is possible in kubernetes provider
Lee-W commented on code in PR #33977:
URL: https://github.com/apache/airflow/pull/33977#discussion_r1312404798
##########
airflow/providers/cncf/kubernetes/executors/kubernetes_executor.py:
##########
@@ -354,8 +355,8 @@ def sync(self) -> None:
self.kube_scheduler.sync()
last_resource_version: dict[str, str] = defaultdict(lambda: "0")
- while True:
- try:
+ with contextlib.suppress(Empty):
Review Comment:
Will it break when `Empty` is raised as it used to be?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org