Skip to content

Commit

Permalink
fixup! Handle kubernetes watcher stream disconnection
Browse files Browse the repository at this point in the history
  • Loading branch information
ephraimbuddy committed Apr 23, 2021
1 parent 464b49e commit 98e9d6f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions airflow/executors/kubernetes_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ def __init__(self):
class ResourceVersion(Borg):
"""Track resourceVersion from Kubernetes"""

def __init__(self, *, kube_client=None, namespace=None, resource_version=None):
def __init__(
self,
*,
kube_client: Optional[client.CoreV1Api] = None,
namespace: Optional[str] = None,
resource_version: Optional[str] = None,
):
Borg.__init__(self)
if resource_version:
# Update the state
Expand All @@ -93,7 +99,7 @@ def _drop(cls):
cls._shared_state = {}


def get_resource_version(kube_client: client.CoreV1Api, namespace):
def get_resource_version(kube_client: client.CoreV1Api, namespace: str):
"""
List pods to get the latest resource version
Expand Down

0 comments on commit 98e9d6f

Please sign in to comment.