Integrate uwsgi with django 80/84180/2
authoryangyan <yangyanyj@chinamobile.com>
Thu, 4 Apr 2019 03:04:38 +0000 (11:04 +0800)
committeryangyan <yangyanyj@chinamobile.com>
Thu, 4 Apr 2019 03:25:52 +0000 (11:25 +0800)
Change-Id: I600f42489c95a54b8a70ca1978d6b039fe945ebe
Issue-ID: VFC-1336
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
requirements.txt
run.sh
stop.sh

index 73576c1..b60dce0 100644 (file)
@@ -31,4 +31,7 @@ flex>=6.11.1
 swagger-spec-validator>=2.1.0
 
 # for onap logging
-onappylog>=1.0.6
\ No newline at end of file
+onappylog>=1.0.6
+
+# uwsgi for parallel processing
+uwsgi
\ No newline at end of file
diff --git a/run.sh b/run.sh
index 8623a42..c4849d3 100755 (executable)
--- a/run.sh
+++ b/run.sh
@@ -18,7 +18,8 @@ if [ ! -x  $logDir  ]; then
        mkdir -p $logDir
 fi
 
-nohup python manage.py runserver 0.0.0.0:8806 > /dev/null &
+# nohup python manage.py runserver 0.0.0.0:8806 > /dev/null &
+nohup uwsgi --http :8806 -t 120 --module lcm.wsgi --master --processes 4 &
 
 while [ ! -f $logDir/runtime_catalog.log ]; do
     sleep 1
diff --git a/stop.sh b/stop.sh
index 5b0b806..773a578 100755 (executable)
--- a/stop.sh
+++ b/stop.sh
@@ -13,4 +13,5 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ps auxww | grep "manage.py runserver 0.0.0.0:8806" | awk '{print $2}' | xargs kill -9
+# ps auxww | grep "manage.py runserver 0.0.0.0:8806" | awk '{print $2}' | xargs kill -9
+ps auxww |grep 'uwsgi --http :8806 --module lcm.wsgi --master' |awk '{print $2}' |xargs kill -9