From 8cf5ec4adee3868174f1a7c2735a7fca8992f498 Mon Sep 17 00:00:00 2001 From: yangyan Date: Thu, 4 Apr 2019 11:04:38 +0800 Subject: [PATCH] Integrate uwsgi with django Change-Id: I600f42489c95a54b8a70ca1978d6b039fe945ebe Issue-ID: VFC-1336 Signed-off-by: yangyan --- requirements.txt | 5 ++++- run.sh | 3 ++- stop.sh | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 73576c12..b60dce06 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 8623a421..c4849d3a 100755 --- 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 5b0b8065..773a578a 100755 --- 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 -- 2.16.6