howardyoo commented on code in PR #37948:
URL: https://github.com/apache/airflow/pull/37948#discussion_r1524165158


##########
airflow/jobs/job.py:
##########
@@ -211,35 +211,29 @@ def heartbeat(
                 heartbeat_callback(session)
                 self.log.debug("[heartbeat]")
             except OperationalError:
-                Stats.incr(convert_camel_to_snake(self.__class__.__name__) + 
"_heartbeat_failure", 1, 1)
+                class_name = self.__class__.__name__
+                Stats.incr(convert_camel_to_snake(class_name) + 
"_heartbeat_failure", 1, 1)

Review Comment:
   I think I'd prefer the code to be simpler - so will remove those 1,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