o-nikolas commented on code in PR #38093:
URL: https://github.com/apache/airflow/pull/38093#discussion_r1525317490


##########
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:
   We need to ensure that an init of all executors is called at some point and 
then store that on a variable somewhere for repeated access within each job. 
This is simply a tidy/convenient spot to do that, since multiple jobs need 
access to these executors (scheduler and backfill at the least). So it's nice 
to do it once here, and then reference it from `self.job.executors` within the 
various JobRunners after instead of calling directly and repeating things in 
each Runner.



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