Skip to content

Commit

Permalink
fix name of timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
dstandish committed May 14, 2024
1 parent 5c5044c commit 54a3fe0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def _run(
) -> str | None:
self.log.info("Event: and now my watch begins starting at resource_version: %s", resource_version)

kwargs = {"label_selector": f"airflow-worker={scheduler_job_id}"}
kwargs: dict[str:Any] = {"label_selector": f"airflow-worker={scheduler_job_id}"}
if resource_version:
kwargs["resource_version"] = resource_version
if kube_config.kube_client_request_args:
Expand All @@ -151,9 +151,9 @@ def _run(
# For info about k8s timeout settings see
# https://github.com/kubernetes-client/python/blob/v29.0.0/examples/watch/timeout-settings.md
# and https://github.com/kubernetes-client/python/blob/v29.0.0/kubernetes/client/api_client.py#L336-L339
request_timeout = 30
client_timeout = 30
server_conn_timeout = 3600
kwargs["_request_timeout"] = request_timeout
kwargs["_request_timeout"] = client_timeout
kwargs["timeout_seconds"] = server_conn_timeout

for event in self._pod_events(kube_client=kube_client, query_kwargs=kwargs):
Expand Down

0 comments on commit 54a3fe0

Please sign in to comment.