potiuk commented on code in PR #56690:
URL: https://github.com/apache/airflow/pull/56690#discussion_r2446729883
##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -835,6 +836,24 @@ def _validate_task_inlets_and_outlets(*, ti:
RuntimeTaskInstance, log: Logger) -
)
+def _get_resource_usage() -> tuple[float, float] | None:
+ """Get current resource usage for the task process."""
+ try:
+ process = psutil.Process()
+
+ # Get CPU usage
+ cpu_percent = process.cpu_percent(interval=0)
Review Comment:
Ah .. I see it's already done.
--
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]