ashb commented on code in PR #45008:
URL: https://github.com/apache/airflow/pull/45008#discussion_r1890933489
##########
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:
If this is referring to a TI it should also have the UUID column from
`task_instance.id`
--
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]