anishgirianish commented on code in PR #63491:
URL: https://github.com/apache/airflow/pull/63491#discussion_r3179114556
##########
airflow-core/src/airflow/executors/base_executor.py:
##########
@@ -382,27 +399,11 @@ def _emit_metrics(self, open_slots, num_running_tasks,
num_queued_tasks):
tags={"status": "running", "name": name},
)
- def order_queued_tasks_by_priority(self) -> list[tuple[TaskInstanceKey,
workloads.ExecuteTask]]:
- """
- Orders the queued tasks by priority.
-
- :return: List of workloads from the queued_tasks according to the
priority.
- """
- if not self.queued_tasks:
- return []
-
- # V3 + new executor that supports workloads
- return sorted(
- self.queued_tasks.items(),
- key=lambda x: x[1].ti.priority_weight,
- reverse=False,
- )
-
- def trigger_tasks(self, open_slots: int) -> None:
+ def trigger_workloads(self, open_slots: int) -> None:
Review Comment:
Added shims for both trigger_tasks and order_queued_tasks_by_priority;
covered by new tests.
--
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]