From: yangyan Date: Thu, 4 Apr 2019 09:26:19 +0000 (+0800) Subject: Integrate uwsgi with django X-Git-Tag: 1.3.0~55 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=4f0c84fa2021efffa396c4e538417df156921620;p=vfc%2Fnfvo%2Flcm.git Integrate uwsgi with django Change-Id: I92029455c1ba38506b41449ff27a14bf93b55b92 Issue-ID: VFC-1336 Signed-off-by: yangyan --- diff --git a/requirements.txt b/requirements.txt index e3cded35..a3dec560 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,4 +33,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 diff --git a/run.sh b/run.sh index 2eea401f..79335c77 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:8403 > /dev/null & +# nohup python manage.py runserver 0.0.0.0:8403 > /dev/null & +nohup uwsgi --http :8403 -t 120 --module lcm.wsgi --master --processes 4 & while [ ! -f $logDir/runtime_nslcm.log ]; do sleep 1 diff --git a/stop.sh b/stop.sh index 09aed90b..e255c061 100755 --- a/stop.sh +++ b/stop.sh @@ -12,4 +12,5 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -ps auxww | grep "manage.py runserver 0.0.0.0:8403" | awk '{print $2}' | xargs kill -9 +# ps auxww | grep "manage.py runserver 0.0.0.0:8403" | awk '{print $2}' | xargs kill -9 +ps auxww |grep 'uwsgi --http :8403 --module lcm.wsgi --master' |awk '{print $2}' |xargs kill -9