summaryrefslogtreecommitdiffstats
path: root/zte
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2019-04-22 09:43:03 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2019-04-22 09:43:03 +0800
commitd534b34f13785ea712ec35434ac68e3abcd5e705 (patch)
tree8822fe6790b7d0dc7092aa5321161c2872b76312 /zte
parentf424e7777ea76929ed5d8d28ac67d872bf9a08e0 (diff)
Add uwsgi support for ztevnfmdriver
Change-Id: Ia9d48e73ac4b4270684e3134be944527d286173c Issue-ID: VFC-1307 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'zte')
-rw-r--r--zte/vmanager/requirements.txt5
-rwxr-xr-xzte/vmanager/run.sh4
-rwxr-xr-xzte/vmanager/stop.sh5
3 files changed, 11 insertions, 3 deletions
diff --git a/zte/vmanager/requirements.txt b/zte/vmanager/requirements.txt
index 8c114dcd..d22c1229 100644
--- a/zte/vmanager/requirements.txt
+++ b/zte/vmanager/requirements.txt
@@ -16,4 +16,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/zte/vmanager/run.sh b/zte/vmanager/run.sh
index 5c6e8339..f0f0d485 100755
--- a/zte/vmanager/run.sh
+++ b/zte/vmanager/run.sh
@@ -18,7 +18,9 @@ if [ ! -x $logDir ]; then
mkdir -p $logDir
fi
-nohup python manage.py runserver 0.0.0.0:8410 > /dev/null &
+# nohup python manage.py runserver 0.0.0.0:8410 > /dev/null &
+
+nohup uwsgi --http :8410 -t 120 --module driver.wsgi --master --processes 4 &
while [ ! -f $logDir/runtime_ztevnfmdriver.log ]; do
sleep 1
diff --git a/zte/vmanager/stop.sh b/zte/vmanager/stop.sh
index 8848e16d..6f0b7844 100755
--- a/zte/vmanager/stop.sh
+++ b/zte/vmanager/stop.sh
@@ -12,4 +12,7 @@
# 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:8410" | awk '{print $2}' | xargs kill -9
+
+# ps auxww | grep "manage.py runserver 0.0.0.0:8410" | awk '{print $2}' | xargs kill -9
+
+ps auxww |grep 'uwsgi --http :8410 --module driver.wsgi --master' |awk '{print $2}' |xargs kill -9