anishgirianish commented on code in PR #63491:
URL: https://github.com/apache/airflow/pull/63491#discussion_r4002260193
##########
airflow-core/src/airflow/executors/base_executor.py:
##########
@@ -252,6 +303,62 @@ def __repr__(self):
_repr += ")"
return _repr
+ @property
+ def queued_tasks(self) -> dict:
+ """Backward-compat property: delegates to
``executor_queues[WorkloadType.EXECUTE_TASK]``."""
+ self._warn_legacy_property(
+ "queued_tasks",
+ "queued_tasks is deprecated. Use
executor_queues[WorkloadType.EXECUTE_TASK] instead.",
+ )
+ return self.executor_queues[WorkloadType.EXECUTE_TASK]
+
+ @queued_tasks.setter
+ def queued_tasks(self, value: dict) -> None:
+ """Backward-compat setter: writes through to
``executor_queues[WorkloadType.EXECUTE_TASK]``."""
+ self._warn_legacy_property(
+ "queued_tasks",
+ "queued_tasks is deprecated. Use
executor_queues[WorkloadType.EXECUTE_TASK] instead.",
+ )
+ self.executor_queues[WorkloadType.EXECUTE_TASK] = value
+
+ @property
+ def queued_callbacks(self) -> dict:
+ """Backward-compat property: delegates to
``executor_queues[WorkloadType.EXECUTE_CALLBACK]``."""
+ self._warn_legacy_property(
+ "queued_callbacks",
+ "queued_callbacks is deprecated. Use
executor_queues[WorkloadType.EXECUTE_CALLBACK] instead.",
+ )
+ return self.executor_queues[WorkloadType.EXECUTE_CALLBACK]
+
+ @queued_callbacks.setter
+ def queued_callbacks(self, value: dict) -> None:
+ """Backward-compat setter: writes through to
``executor_queues[WorkloadType.EXECUTE_CALLBACK]``."""
+ self._warn_legacy_property(
+ "queued_callbacks",
+ "queued_callbacks is deprecated. Use
executor_queues[WorkloadType.EXECUTE_CALLBACK] instead.",
+ )
+ self.executor_queues[WorkloadType.EXECUTE_CALLBACK] = value
+
+ @property
+ def supports_callbacks(self) -> bool:
+ """Backward-compat property: True if EXECUTE_CALLBACK is in
supported_workload_types."""
+ self._warn_legacy_property(
+ "supports_callbacks",
+ "supports_callbacks is deprecated. "
+ "Use WorkloadType.EXECUTE_CALLBACK in supported_workload_types
instead.",
+ )
+ return WorkloadType.EXECUTE_CALLBACK in self.supported_workload_types
+
+ @property
+ def supports_connection_test(self) -> bool:
Review Comment:
Added setters for both flags, plus test and newsfragment note. thanks
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]