From 582d9b16d03668c3f224546d725555bb9493cc11 Mon Sep 17 00:00:00 2001 From: Jakub Dardzinski Date: Wed, 24 Apr 2024 16:11:58 +0200 Subject: [PATCH] Use `ProcessPoolExecutor` over `ThreadPoolExecutor`. Signed-off-by: Jakub Dardzinski --- airflow/providers/openlineage/plugins/listener.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airflow/providers/openlineage/plugins/listener.py b/airflow/providers/openlineage/plugins/listener.py index 25ded6d7f4361..86eab064249c3 100644 --- a/airflow/providers/openlineage/plugins/listener.py +++ b/airflow/providers/openlineage/plugins/listener.py @@ -17,7 +17,7 @@ from __future__ import annotations import logging -from concurrent.futures import ThreadPoolExecutor +from concurrent.futures import ProcessPoolExecutor from datetime import datetime from typing import TYPE_CHECKING @@ -250,7 +250,7 @@ def on_failure(): @property def executor(self): if not self._executor: - self._executor = ThreadPoolExecutor(max_workers=8, thread_name_prefix="openlineage_") + self._executor = ProcessPoolExecutor(max_workers=1) return self._executor @hookimpl