mediagoblin-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GMG-Devel] [PATCH] Simpler use of uwsgi using lazyuwsgi.sh


From: Romain Porte
Subject: [GMG-Devel] [PATCH] Simpler use of uwsgi using lazyuwsgi.sh
Date: Sun, 12 Nov 2017 20:42:56 +0100

This patch proposes a lazyuwsgi.sh starter than can launch uwsgi if the
correct --socket option is passed.
---
 lazystarter.sh | 9 ++++++++-
 lazyuwsgi.sh   | 1 +
 setup.py       | 3 ++-
 3 files changed, 11 insertions(+), 2 deletions(-)
 create mode 120000 lazyuwsgi.sh

diff --git a/lazystarter.sh b/lazystarter.sh
index b531b068..cdd0cc70 100755
--- a/lazystarter.sh
+++ b/lazystarter.sh
@@ -28,8 +28,12 @@ case "$selfname" in
         starter_cmd=celery
         ini_prefix=mediagoblin
         ;;
+    lazyuwsgi.sh)
+        starter_cmd=uwsgi;
+        ini_prefix=paste
+        ;;
     *)
-        echo "Start this script with the name lazyserver.sh or 
lazycelery.sh">&2
+        echo "Start this script with the name lazyserver.sh, lazycelery.sh or 
lazyuwsgi.sh">&2
         exit 1
         ;;
 esac
@@ -84,6 +88,9 @@ case "$selfname" in
     lazyserver.sh)
         $starter serve "$ini_file" "$@" --reload;
         ;;
+    lazyuwsgi.sh)
+        $starter --plugin python --virtualenv . --ini-paste "$ini_file" "$@";
+        ;;
     lazycelery.sh)
         MEDIAGOBLIN_CONFIG="${ini_file}" \
             CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_celery \
diff --git a/lazyuwsgi.sh b/lazyuwsgi.sh
new file mode 120000
index 00000000..4ff15b1d
--- /dev/null
+++ b/lazyuwsgi.sh
@@ -0,0 +1 @@
+lazystarter.sh
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 72c19735..3739f720 100644
--- a/setup.py
+++ b/setup.py
@@ -74,7 +74,8 @@ install_requires = [
     'PasteScript',
     'requests>=2.6.0',
     'pyld',
-    'ExifRead>=2.0.0'
+    'ExifRead>=2.0.0',
+    'uwsgi>=2.0'
     # This is optional:
     # 'translitcodec',
     # For now we're expecting that users will install this from
-- 
2.15.0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]