ashb commented on code in PR #47126:
URL: https://github.com/apache/airflow/pull/47126#discussion_r1972474699


##########
airflow/api_fastapi/execution_api/routes/task_instances.py:
##########
@@ -151,14 +151,16 @@ def ti_run(
                 "previous_state": previous_state,
             },
         )
-    log.info("Task with %s state started on %s ", previous_state, 
ti_run_payload.hostname)
+    else:
+        log.info("Task with %s state started on %s ", previous_state, 
ti_run_payload.hostname)
     # Ensure there is no end date set.
     query = query.values(
         end_date=None,
         hostname=ti_run_payload.hostname,
         unixname=ti_run_payload.unixname,
         pid=ti_run_payload.pid,
-        state=State.RUNNING,
+        state=TaskInstanceState.RUNNING,

Review Comment:
   Fixed up a nit where we were using the generic `State` enum rather than the 
TI specific one. (no change in behaviour, this is just "more correct")



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