Skip to content

Commit

Permalink
Fix webserver exiting when gunicorn master crashes (#13470)
Browse files Browse the repository at this point in the history
closes #13469
  • Loading branch information
drago-f5a authored Mar 9, 2021
1 parent 577c82d commit c990931
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions airflow/bin/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1090,13 +1090,13 @@ def _check_workers(self):
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
Expand Down

0 comments on commit c990931

Please sign in to comment.