This is an automated email from the ASF dual-hosted git repository.

uranusjr pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new ee1d143  Disable connection pool for celery worker (#22493)
ee1d143 is described below

commit ee1d1433ed30f6ba093dca0e40b783f0d6529c43
Author: Ping Zhang <[email protected]>
AuthorDate: Thu Mar 24 19:03:07 2022 -0700

    Disable connection pool for celery worker (#22493)
---
 airflow/cli/commands/celery_command.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/airflow/cli/commands/celery_command.py 
b/airflow/cli/commands/celery_command.py
index a962d4c..e7e9a7b 100644
--- a/airflow/cli/commands/celery_command.py
+++ b/airflow/cli/commands/celery_command.py
@@ -100,6 +100,8 @@ def _run_worker(options, skip_serve_logs):
 @cli_utils.action_cli
 def worker(args):
     """Starts Airflow Celery worker"""
+    # Disable connection pool so that celery worker does not hold an 
unnecessary db connection
+    settings.reconfigure_orm(disable_connection_pool=True)
     if not settings.validate_session():
         raise SystemExit("Worker exiting, database connection precheck 
failed.")
 

Reply via email to