o-nikolas commented on code in PR #38093:
URL: https://github.com/apache/airflow/pull/38093#discussion_r1523523927
##########
airflow/jobs/job.py:
##########
@@ -123,6 +123,10 @@ def __init__(self, executor=None, heartrate=None,
**kwargs):
def executor(self):
return ExecutorLoader.get_default_executor()
+ @cached_property
Review Comment:
As @dirrao pointed out, this is already how we do it for the executor
property for a while now, since neither is on the ORM model. Jobs aren't
created that often and the ExecutorLoader caches all executors, so the cost is
already paid and it is a quick lookup here.
--
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]