Lee-W commented on code in PR #38674:
URL: https://github.com/apache/airflow/pull/38674#discussion_r1575716908


##########
airflow/models/baseoperator.py:
##########
@@ -1693,6 +1698,16 @@ def inherits_from_empty_operator(self):
         # of its subclasses (which don't inherit from anything but 
BaseOperator).
         return getattr(self, "_is_empty", False)
 
+    @property
+    def start_trigger(self) -> BaseTrigger | None:
+        """Trigger when deferring task."""
+        return self._start_trigger
+
+    @property
+    def next_method(self) -> str | None:
+        """Method to execute after finish deferring."""
+        return self._next_method

Review Comment:
   The original idea was to prevent the DAG author from assigning this value. 
e.g.,
   
   ```python
   op = SomeOperator(task_id="task_id")
   op.start_trigger = ...
   op.next_method
   
   # They can still do op._start_trigger though
   ```
   
   Not sure whether it's a valid concern



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