Integrate uwsgi with django 82/84182/2
authoryangyan <yangyanyj@chinamobile.com>
Thu, 4 Apr 2019 03:14:13 +0000 (11:14 +0800)
committeryangyan <yangyanyj@chinamobile.com>
Thu, 4 Apr 2019 03:27:08 +0000 (11:27 +0800)
Change-Id: If70f5f4fb14452ab7a11075821124ddea2bad86d
Issue-ID: VFC-1336
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
lcm/requirements.txt
lcm/run.sh
lcm/stop.sh

index bb92e20..26748fb 100644 (file)
@@ -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
index 32e0cfc..8c9fcf8 100755 (executable)
@@ -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
index 8ddb108..341f648 100755 (executable)
@@ -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