ferruzzi commented on code in PR #37948:
URL: https://github.com/apache/airflow/pull/37948#discussion_r1520533373
##########
airflow/executors/base_executor.py:
##########
@@ -287,15 +301,41 @@ def trigger_tasks(self, open_slots: int) -> None:
if key in self.attempts:
del self.attempts[key]
task_tuples.append((key, command, queue, ti.executor_config))
+ s.add_event(
+ name="task to trigger",
+ attributes={"command": str(command), "conf":
str(ti.executor_config)},
+ )
if task_tuples:
self._process_tasks(task_tuples)
+ @span
def _process_tasks(self, task_tuples: list[TaskTuple]) -> None:
+ from airflow.traces.utils import gen_span_id_from_ti_key, gen_trace_id
+
for key, command, queue, executor_config in task_tuples:
- del self.queued_tasks[key]
- self.execute_async(key=key, command=command, queue=queue,
executor_config=executor_config)
- self.running.add(key)
+ qt = self.queued_tasks[key][3]
+ trace_id = int(gen_trace_id(qt.dag_run), 16) # TaskInstance in
fourth element
Review Comment:
oof. That makes the suggestion less useful... hmm....... I'll think on
it, you shouldn't have to be casting it a million times, there must be a better
way.
--
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]