dstandish commented on code in PR #38297:
URL: https://github.com/apache/airflow/pull/38297#discussion_r1531000894
##########
airflow/models/taskinstance.py:
##########
@@ -1839,6 +1839,36 @@ def key(self) -> TaskInstanceKey:
"""Returns a tuple that identifies the task instance uniquely."""
return TaskInstanceKey(self.dag_id, self.task_id, self.run_id,
self.try_number, self.map_index)
+ @staticmethod
+ @internal_api_call
+ @provide_session
+ def _set_state(ti, state, session=NEW_SESSION):
+ TI = TaskInstance
+ if not isinstance(ti, TaskInstance):
+ ti = (
+ session.query(TI)
Review Comment:
wait...
no so the reason for this is, if we already have a TI object there is no
need to go fetch it from the DB.
wdyt?
--
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]