You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/12/09 20:31:35 UTC
[GitHub] [airflow] pierrejeambrun commented on a diff in pull request #28273: Make CeleryKubernetesExecutor extends BaseExecutor
pierrejeambrun commented on code in PR #28273:
URL: https://github.com/apache/airflow/pull/28273#discussion_r1044822177
##########
airflow/executors/celery_kubernetes_executor.py:
##########
@@ -44,27 +48,27 @@ class CeleryKubernetesExecutor(LoggingMixin):
KUBERNETES_QUEUE = conf.get("celery_kubernetes_executor", "kubernetes_queue")
def __init__(self, celery_executor: CeleryExecutor, kubernetes_executor: KubernetesExecutor):
- super().__init__()
+ self._set_context(None)
self._job_id: int | None = None
self.celery_executor = celery_executor
self.kubernetes_executor = kubernetes_executor
self.kubernetes_executor.kubernetes_queue = self.KUBERNETES_QUEUE
@property
- def queued_tasks(self) -> dict[TaskInstanceKey, QueuedTaskInstanceType]:
+ def queued_tasks(self) -> dict[TaskInstanceKey, QueuedTaskInstanceType]: # type: ignore[override]
"""Return queued tasks from celery and kubernetes executor."""
queued_tasks = self.celery_executor.queued_tasks.copy()
queued_tasks.update(self.kubernetes_executor.queued_tasks)
return queued_tasks
@property
- def running(self) -> set[TaskInstanceKey]:
+ def running(self) -> set[TaskInstanceKey]: # type: ignore[override]
"""Return running tasks from celery and kubernetes executor."""
return self.celery_executor.running.union(self.kubernetes_executor.running)
- @property
- def job_id(self) -> int | None:
+ @property # type: ignore[override]
Review Comment:
removing one of those 2 ignore raises an error. I think it is because of the setter below.
--
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