o-nikolas commented on code in PR #30361:
URL: https://github.com/apache/airflow/pull/30361#discussion_r1160241677


##########
airflow/executors/base_executor.py:
##########
@@ -216,6 +215,8 @@ def heartbeat(self) -> None:
         self.log.debug("%s in queue", num_queued_tasks)
         self.log.debug("%s open slots", open_slots)
 
+        from airflow.stats import Stats

Review Comment:
   Thanks for the details @potiuk!
   
   I've verified that stats is trivially fast when conf is already imported. I 
do actually have future plans to move conf imports closer to where they are 
used to speed up loading times further, and in that case it may be beneficial 
to move stat as well (but many things use conf so it may be difficult to remove 
it entirely from the whole imported namespace, the __init__ case may make it 
unsolvable for that module in particular).
   
   If having Stats imported where I've moved it in this PR is unacceptable I 
can update the change :+1: 



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