profgrammer commented on code in PR #58190:
URL: https://github.com/apache/airflow/pull/58190#discussion_r2522563889


##########
airflow-core/src/airflow/jobs/job.py:
##########
@@ -164,7 +164,7 @@ def executors(self):
 
     @cached_property
     def heartrate(self) -> float:
-        return Job._heartrate(self.job_type)
+        return Job._heartrate(str(self.job_type))

Review Comment:
   The default value for the `_heartrate` function is the scheduler heart rate. 
parsing `None` to string does not throw any runtime errors, it just returns the 
string `'None'`.
   
   I can think of two options here: 
   * return sensible default (maybe 0?) in case the job type is none
   * current implementation - return the default scheduler heart rate
   
   please advise, I'd be happy to incorporate any of these changes in the PR. 



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