コード例 #1
0
 def __init__(self):
     self.kube_config = KubeConfig()
     self._manager = multiprocessing.Manager()
     self.task_queue: 'Queue[KubernetesJobType]' = self._manager.Queue()
     self.result_queue: 'Queue[KubernetesResultsType]' = self._manager.Queue()
     self.kube_scheduler: Optional[AirflowKubernetesScheduler] = None
     self.kube_client: Optional[client.CoreV1Api] = None
     self.scheduler_job_id: Optional[str] = None
     super().__init__(parallelism=self.kube_config.parallelism)
コード例 #2
0
 def __init__(self):
     self.kube_config = KubeConfig()
     self._manager = multiprocessing.Manager()
     self.task_queue: 'Queue[KubernetesJobType]' = self._manager.Queue()
     self.result_queue: 'Queue[KubernetesResultsType]' = self._manager.Queue()
     self.kube_scheduler: Optional[AirflowKubernetesScheduler] = None
     self.kube_client: Optional[client.CoreV1Api] = None
     self.scheduler_job_id: Optional[int] = None
     self.event_scheduler: Optional[EventScheduler] = None
     self.last_handled: Dict[TaskInstanceKey, float] = {}
     super().__init__(parallelism=self.kube_config.parallelism)