houqp commented on a change in pull request #6311:
URL: https://github.com/apache/airflow/pull/6311#discussion_r428236112
##########
File path: airflow/jobs/base_job.py
##########
@@ -147,7 +147,7 @@ def heartbeat_callback(self, session=None):
Callback that is called during heartbeat. This method should be
overwritten.
"""
- def heartbeat(self):
+ def heartbeat(self, only_if_necessary=False):
Review comment:
yes, having type hint prevents caller from passing in with a variable of
wrong type by accident. it will also help with type checking within this method
anywhere `only_if_necessary` is used.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]