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

kaxilnaik pushed a commit to branch v1-10-stable
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v1-10-stable by this push:
     new c990931  Fix webserver exiting when gunicorn master crashes (#13470)
c990931 is described below

commit c9909316101618e02b407aa81f6993aa5765aa74
Author: drago-f5a <[email protected]>
AuthorDate: Tue Mar 9 16:30:45 2021 -0600

    Fix webserver exiting when gunicorn master crashes (#13470)
    
    closes #13469
---
 airflow/bin/cli.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/airflow/bin/cli.py b/airflow/bin/cli.py
index 70a1107..843282a 100644
--- a/airflow/bin/cli.py
+++ b/airflow/bin/cli.py
@@ -1090,13 +1090,13 @@ class GunicornMonitor(LoggingMixin):
             num_workers_running = self._get_num_workers_running()
             if num_workers_running < self.num_workers_expected:
                 new_worker_count = min(
-                    num_workers_running - self.worker_refresh_batch_size, 
self.worker_refresh_batch_size
+                    self.num_workers_expected - num_workers_running, 
self.worker_refresh_batch_size
                 )
-                self.log.debug(
+                self.log.info(
                     '[%d / %d] Spawning %d workers',
                     num_ready_workers_running, num_workers_running, 
new_worker_count
                 )
-                self._spawn_new_workers(num_workers_running)
+                self._spawn_new_workers(new_worker_count)
             return
 
         # Now the number of running and expected worker should be equal

Reply via email to