anishgirianish commented on code in PR #63491:
URL: https://github.com/apache/airflow/pull/63491#discussion_r3004405002


##########
airflow-core/src/airflow/executors/workloads/task.py:
##########
@@ -71,7 +71,17 @@ class ExecuteTask(BaseDagBundleWorkload):
     ti: TaskInstanceDTO
     sentry_integration: str = ""
 
-    type: Literal["ExecuteTask"] = Field(init=False, default="ExecuteTask")
+    type: Literal[WorkloadType.EXECUTE_TASK] = Field(init=False, 
default=WorkloadType.EXECUTE_TASK)
+
+    @property
+    def queue_key(self) -> TaskInstanceKey:
+        """Return the task instance key as the queue key."""
+        return self.ti.key
+
+    @property
+    def sort_key(self) -> int:
+        """Return the task priority weight for sorting (lower = higher 
priority)."""
+        return self.ti.priority_weight

Review Comment:
   Ascending sort on priority_weight matches existing behavior on main 
(order_queued_tasks_by_priority uses reverse=False). No change in semantics.



-- 
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]

Reply via email to