rawwar commented on code in PR #49477:
URL: https://github.com/apache/airflow/pull/49477#discussion_r2053052725


##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:
##########
@@ -141,7 +141,11 @@ def ti_run(
 
     # If we are already running, but this is a duplicate request from the same 
client return the same OK
     # -- it's possible there was a network glitch and they never got the 
response
-    if previous_state == TaskInstanceState.RUNNING and (ti["hostname"], 
ti["unixname"], ti["pid"]) == (
+    if previous_state == TaskInstanceState.RUNNING and (
+        ti._mapping["hostname"],
+        ti._mapping["unixname"],
+        ti._mapping["pid"],

Review Comment:
   I was going through docs again and see this 
   > This 
[Row](https://docs.sqlalchemy.org/en/20/core/connections.html#sqlalchemy.engine.Row)
 behaves like a named tuple, in that it acts as a sequence but also supports 
attribute name access, e.g. row.some_column. However, it also provides the 
previous “mapping” behavior via the special attribute row._mapping, which 
produces a Python mapping such that keyed access such as row["some_column"] can 
be used.
   
   
   I can just do ti.hostname. I'll update the code



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