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/17 23:52:51 UTC

[GitHub] stale[bot] closed pull request #3134: [AIRFLOW-878] Use absolute gunicorn executable location

stale[bot] closed pull request #3134: [AIRFLOW-878] Use absolute gunicorn executable location
URL: https://github.com/apache/incubator-airflow/pull/3134
 
 
   

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 449d8ca8da..6046569391 100755
--- a/airflow/bin/cli.py
+++ b/airflow/bin/cli.py
@@ -734,8 +734,17 @@ def webserver(args):
                 =================================================================\
             '''.format(**locals())))
 
+        def get_gunicorn_location():
+            location = os.path.join(
+                os.path.dirname(sys.executable), "gunicorn")
+            if os.path.isfile(location) and os.access(location, os.X_OK):
+                return location
+            raise AirflowException("gunicorn could not be found")
+
+        gunicorn_exec = get_gunicorn_location()
+
         run_args = [
-            'gunicorn',
+            gunicorn_exec,
             '-w', str(num_workers),
             '-k', str(args.workerclass),
             '-t', str(worker_timeout),


 

----------------------------------------------------------------
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