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 2018/12/28 12:56:42 UTC

[GitHub] stale[bot] closed pull request #3586: [AIRFLOW-2733] Reconcile psutil and subprocess in webserver cli

stale[bot] closed pull request #3586: [AIRFLOW-2733] Reconcile psutil and subprocess in webserver cli
URL: https://github.com/apache/incubator-airflow/pull/3586
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/bin/cli.py b/airflow/bin/cli.py
index 53fe0a3401..0686737b19 100644
--- a/airflow/bin/cli.py
+++ b/airflow/bin/cli.py
@@ -922,9 +922,7 @@ def monitor_gunicorn(gunicorn_master_proc):
                 master_timeout = conf.getint('webserver', 'web_server_master_timeout')
                 restart_workers(gunicorn_master_proc, num_workers, master_timeout)
             else:
-                while gunicorn_master_proc.poll() is None:
-                    time.sleep(1)
-
+                gunicorn_master_proc.wait()
                 sys.exit(gunicorn_master_proc.returncode)
 
         if args.daemon:
@@ -959,7 +957,7 @@ def monitor_gunicorn(gunicorn_master_proc):
             stdout.close()
             stderr.close()
         else:
-            gunicorn_master_proc = subprocess.Popen(run_args, close_fds=True)
+            gunicorn_master_proc = psutil.Popen(run_args, close_fds=True)
 
             signal.signal(signal.SIGINT, kill_proc)
             signal.signal(signal.SIGTERM, kill_proc)


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services