Skip to content

Commit

Permalink
Load providers configuration when gunicorn workers start (#38795)
Browse files Browse the repository at this point in the history
When Gunicorn workers start, they do not fork, but start as new
Python interpreters and they should also perform loadig of the
configuration from installed providers.
  • Loading branch information
potiuk authored Apr 6, 2024
1 parent 4d65f21 commit 042c2ac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion airflow/www/gunicorn_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,8 @@ def post_worker_init(_):
def on_starting(server):
from airflow.providers_manager import ProvidersManager

providers_manager = ProvidersManager()
# Load providers configuration before forking workers
providers_manager.initialize_providers_configuration()
# Load providers before forking workers
ProvidersManager().connection_form_widgets
providers_manager.connection_form_widgets

0 comments on commit 042c2ac

Please sign in to comment.