jason810496 commented on code in PR #45631:
URL: https://github.com/apache/airflow/pull/45631#discussion_r1915905966
##########
airflow/utils/log/file_task_handler.py:
##########
@@ -313,10 +313,18 @@ def _render_filename(self, ti: TaskInstance, try_number:
int, session=NEW_SESSIO
def _read_grouped_logs(self):
return False
- @cached_property
- def _executor_get_task_log(self) -> Callable[[TaskInstance, int],
tuple[list[str], list[str]]]:
- """This cached property avoids loading executor repeatedly."""
- executor = ExecutorLoader.get_default_executor()
+ def _get_executor_get_task_log(
Review Comment:
Indeed, I solved it on the `ExecutorLoader` side yesterday by checking
whether the executor was already loaded in the `load_executor` method.
However, after @nradz shared the solution pointing out that we can cache
executors mapping to avoid loading the executor repeatedly, I adopted that
approach and resolved the issue on the `FileTaskHandler` side.
--
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]