You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/11/19 17:28:59 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #19709: Speed up webserver boot time by delaying provider initialization

potiuk commented on a change in pull request #19709:
URL: https://github.com/apache/airflow/pull/19709#discussion_r753377207



##########
File path: airflow/www/gunicorn_config.py
##########
@@ -30,3 +30,10 @@ def post_worker_init(_):
     """
     old_title = setproctitle.getproctitle()
     setproctitle.setproctitle(settings.GUNICORN_WORKER_READY_PREFIX + old_title)
+
+
+def on_starting(server):
+    from airflow.providers_manager import ProvidersManager
+
+    # Load providers before forking workers
+    ProvidersManager().connection_form_widgets

Review comment:
       Fantastic idea to load the connections only once :)




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org