uranusjr commented on code in PR #32646:
URL: https://github.com/apache/airflow/pull/32646#discussion_r1269092053


##########
airflow/models/taskinstance.py:
##########
@@ -877,6 +877,19 @@ def refresh_from_db(self, session: Session = NEW_SESSION, 
lock_for_update: bool
         else:
             self.state = None
 
+    @classmethod
+    def from_ti_key(cls, ti_key, session) -> TaskInstance | None:

Review Comment:
   This method sounds like creating a ti from ti key; I’d name this something 
like `get_from_key`



##########
airflow/models/taskinstance.py:
##########
@@ -877,6 +877,19 @@ def refresh_from_db(self, session: Session = NEW_SESSION, 
lock_for_update: bool
         else:
             self.state = None
 
+    @classmethod
+    def from_ti_key(cls, ti_key, session) -> TaskInstance | None:

Review Comment:
   This method sounds like creating a ti from ti key; I’d name this something 
like `get_from_key`



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