jason810496 commented on code in PR #76539:
URL: https://github.com/apache/airflow/pull/76539#discussion_r4677631159


##########
ts-sdk/src/coordinator/runtime.ts:
##########
@@ -366,8 +382,18 @@ async function handleTask(
 
   const ctx = buildContext(details, signal);
   const client = createCoordinatorClient(comm, ctx, ti.id, clientLogs);
-  if (task.kind === "handler") {
-    return runHandler(details, task.fn, ctx, client, logs);
+  const loop = details.ti_context.loop;
+  const scope: TaskScope = {
+    ctx,
+    client,
+    ...(loop != null && { loop: createLoopSource(loop, client) }),
+  };
+  const allIterationsArgs = readsAllIterations(task.dag, ti.task_id);
+  if (task.kind === BundleTaskKind.HANDLER) {
+    return runHandler(details, task.fn, scope, client, logs, 
allIterationsArgs);
+  }
+  if (task.kind === BundleTaskKind.LOOP_GATE) {

Review Comment:
   Update:
   
   I read the comment wrong in the last round, I though you referred to using 
the operator type as the gate.
   Yes, we should actually.



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