jscheffl commented on code in PR #45008:
URL: https://github.com/apache/airflow/pull/45008#discussion_r1891409908


##########
providers/src/airflow/providers/edge/executors/edge_executor.py:
##########
@@ -129,6 +129,34 @@ def execute_async(
             )
         )
 
+    @provide_session
+    def queue_workload(
+        self,
+        workload: Any,  # Note actually "airflow.executors.workloads.All" but 
not existing in Airflow 2.10
+        session: Session = NEW_SESSION,
+    ) -> None:
+        """Put new workload to queue. Airflow 3 entry point to execute a 
task."""
+        from airflow.executors import workloads
+
+        if not isinstance(workload, workloads.ExecuteTask):
+            raise TypeError(f"Don't know how to queue workload of type 
{type(workload).__name__}")
+
+        task_instance = workload.ti
+        key = task_instance.key
+        session.add(
+            EdgeJobModel(

Review Comment:
   I need to switch the model - but rather in a later PR. As atm this is not 
critical and Airflow 2 does not have the UUID. But once we can drop Airflow 2 
support that totally makes sense.



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