Skip to content

Commit

Permalink
less invasive fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jedcunningham committed Jan 10, 2025
1 parent 998c201 commit 37c41a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 5 additions & 0 deletions airflow/dag_processing/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,13 @@ def _parse_file_entrypoint():
import structlog

from airflow.sdk.execution_time import task_runner
from airflow.settings import configure_orm
# Parse DAG file, send JSON back up!

# We need to reconfigure the orm here, as DagFileProcessorManager does db queries for bundles, and
# the session across forks blows things up.
configure_orm()

comms_decoder = task_runner.CommsDecoder[DagFileParseRequest, DagFileParsingResult](
input=sys.stdin,
decoder=TypeAdapter[DagFileParseRequest](DagFileParseRequest),
Expand Down
4 changes: 0 additions & 4 deletions task_sdk/src/airflow/sdk/execution_time/supervisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,6 @@ def exit(n: int) -> NoReturn:
atexit._run_exitfuncs()
base_exit(n)

from airflow import settings

settings.configure_orm()

try:
target()
exit(0)
Expand Down

0 comments on commit 37c41a2

Please sign in to comment.