syedahsn commented on code in PR #40778:
URL: https://github.com/apache/airflow/pull/40778#discussion_r1677319778


##########
airflow/executors/base_executor.py:
##########
@@ -221,30 +222,59 @@ def heartbeat(self) -> None:
         num_running_tasks = len(self.running)
         num_queued_tasks = len(self.queued_tasks)
 
-        self.log.debug("%s running task instances", num_running_tasks)
-        self.log.debug("%s in queue", num_queued_tasks)
-        self.log.debug("%s open slots", open_slots)
+        self._emit_metrics(open_slots, num_running_tasks, num_queued_tasks)
+        self.trigger_tasks(open_slots)
+
+        # Calling child class sync method
+        self.log.debug("Calling the %s sync method", self.__class__)
+        self.sync()
+
+        self.trigger_tasks(open_slots)
+
+        # Calling child class sync method
+        self.log.debug("Calling the %s sync method", self.__class__)
+        self.sync()

Review Comment:
   Not sure which lines you're referring to. I just took all the lines that are 
related to metrics, and put them in `_emit_metrics`. The rest are left as is 
from the original code. 



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to