Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion task-sdk/src/airflow/sdk/execution_time/supervisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1896,7 +1896,13 @@ def supervise(

exit_code = process.wait()
end = time.monotonic()
log.info("Task finished", exit_code=exit_code, duration=end - start, final_state=process.final_state)
log.info(
"Task finished",
task_instance_id=str(ti.id),
exit_code=exit_code,
duration=end - start,
final_state=process.final_state,
)
if log_path and log_file_descriptor:
log_file_descriptor.close()
return exit_code
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ def test_supervise_handles_deferred_task(
"level": "info",
"logger": "supervisor",
"loc": mocker.ANY,
"task_instance_id": str(ti.id),
} in captured_logs

def test_supervisor_handles_already_running_task(self):
Expand Down
Loading