From 496e4fea5e67caae96433150df2797947939312b Mon Sep 17 00:00:00 2001 From: yangyan Date: Thu, 4 Apr 2019 11:14:13 +0800 Subject: Integrate uwsgi with django Change-Id: If70f5f4fb14452ab7a11075821124ddea2bad86d Issue-ID: VFC-1336 Signed-off-by: yangyan --- lcm/requirements.txt | 5 ++++- lcm/run.sh | 3 ++- lcm/stop.sh | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'lcm') diff --git a/lcm/requirements.txt b/lcm/requirements.txt index bb92e205..26748fb9 100644 --- a/lcm/requirements.txt +++ b/lcm/requirements.txt @@ -26,4 +26,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/lcm/run.sh b/lcm/run.sh index 32e0cfc3..8c9fcf8f 100755 --- a/lcm/run.sh +++ b/lcm/run.sh @@ -17,7 +17,8 @@ if [ ! -x $logDir ]; then mkdir -p $logDir fi -nohup python manage.py runserver 0.0.0.0:8801 > /dev/null & +# nohup python manage.py runserver 0.0.0.0:8801 > /dev/null & +nohup uwsgi --http :8801 -t 120 --module lcm.wsgi --master --processes 4 & while [ ! -f $logDir/runtime_lcm.log ]; do sleep 1 diff --git a/lcm/stop.sh b/lcm/stop.sh index 8ddb1081..341f648f 100755 --- a/lcm/stop.sh +++ b/lcm/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:8801' | awk '{print $2}' | xargs kill -9 +# ps auxww | grep 'manage.py runserver 0.0.0.0:8801' | awk '{print $2}' | xargs kill -9 +ps auxww |grep 'uwsgi --http :8801 --module lcm.wsgi --master' |awk '{print $2}' |xargs kill -9 \ No newline at end of file -- cgit 1.2.3-korg