jedcunningham commented on code in PR #39585:
URL: https://github.com/apache/airflow/pull/39585#discussion_r1621558725


##########
airflow/models/dagrun.py:
##########
@@ -1538,19 +1538,11 @@ def schedule_tis(
                 and not ti.task.outlets
             ):
                 dummy_ti_ids.append((ti.task_id, ti.map_index))
-            elif (
-                ti.task.start_trigger is not None
-                and ti.task.next_method is not None
-                and not ti.task.on_execute_callback
-                and not ti.task.on_success_callback
-                and not ti.task.outlets
-            ):
+            elif ti.task.start_from_trigger is True and 
ti.task.start_trigger_args is not None:
+                ti.start_date = timezone.utcnow()
                 if ti.state != TaskInstanceState.UP_FOR_RESCHEDULE:
                     ti.try_number += 1
-                ti.defer_task(
-                    exception=TaskDeferred(trigger=ti.task.start_trigger, 
method_name=ti.task.next_method),
-                    session=session,
-                )
+                ti.defer_task_from_scheduler(session=session, 
start_trigger_args=ti.task.start_trigger_args)

Review Comment:
   This is a bit weird anyways. `defer_task_from_scheduler` (or the equivalent 
method on TI) already has `self.task.start_trigger_args` - we don't need to 
pass it.



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