def __init__(self, kube_client=None, in_cluster=True, cluster_context=None, extract_xcom=False): super(PodLauncher, self).__init__() self._client = kube_client or get_kube_client(in_cluster=in_cluster, cluster_context=cluster_context) self._watch = watch.Watch() self.extract_xcom = extract_xcom self.kube_req_factory = pod_factory.ExtractXcomPodRequestFactory( ) if extract_xcom else pod_factory.SimplePodRequestFactory()
def __init__(self, kube_client=None, in_cluster=True, cluster_context=None, extract_xcom=False): """ Creates the launcher. :param kube_client: kubernetes client :param in_cluster: whether we are in cluster :param cluster_context: context of the cluster :param extract_xcom: whether we should extract xcom """ super(PodLauncher, self).__init__() self._client = kube_client or get_kube_client( in_cluster=in_cluster, cluster_context=cluster_context) self._watch = watch.Watch() self.extract_xcom = extract_xcom self.kube_req_factory = pod_factory.ExtractXcomPodRequestFactory( ) if extract_xcom else pod_factory.SimplePodRequestFactory()