anishgirianish commented on code in PR #63491:
URL: https://github.com/apache/airflow/pull/63491#discussion_r3004410088
##########
airflow-core/src/airflow/executors/base_executor.py:
##########
@@ -354,27 +370,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:
"""
- Initiate async execution of queued workloads (tasks and callbacks), up
to the number of available slots.
+ Initiate async execution of queued workloads, up to the number of
available slots.
- Callbacks are prioritized over tasks to complete existing work before
starting new work.
+ Workloads are scheduled according to their ``WORKLOAD_TYPE_TIER`` and
``sort_key``.
Review Comment:
This is an internal method. No provider code calls it directly; the only
references are version-gated test mocks, so I believe a deprecated alias isn't
needed here.
--
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]