ashb commented on code in PR #47126:
URL: https://github.com/apache/airflow/pull/47126#discussion_r1972483653
##########
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,
+ last_heartbeat_at=timezone.utcnow(),
Review Comment:
Yeah, I almost think it's reasonable to treat any request to the Exec API
form a client as a heartbeat -- so requesting XCom, a connection etc updates
the heartbeat, since we know it was alive.
We don't do it yet on those, but having said that out load (so to speak) I
think that makes sense.
--
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]